-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsampleContract.sol
More file actions
51 lines (38 loc) · 1.26 KB
/
sampleContract.sol
File metadata and controls
51 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
contract Campaign {
uint public balance;
uint hidden_Balance;
constructor (uint bal) {
balance = bal;
hidden_Balance = bal + 200;
}
function getHiddenBalance() public view returns(uint) {
return hidden_Balance;
}
function setHiddenBalance(uint bal) public {
hidden_Balance = bal;
}
function calc(uint a, uint b) public pure {
a = a+b;
}
function recieveUSDT (uint amount) public payable {
// code to check if we recieved the money
}
function recieveLRC () public {
// code to check if we recieved the money
}
function recieveDifferentCrypto (string memory crypto, uint amount) CheckIfTargetReached{
// identify crypto and then code to check if we recieved the money
amountAfterConversion = convertRecievedCryptoToAStableCoin();
// if recieved specified amount => increment bal to amountAfterConversion
}
// convert Recieved Crypto To A Stable Coin
function convertRecievedCryptoToAStableCoin () returns(uint){
// USDT
// check if the recieved crpyto is already USDT
// if not, convert using Uniswap
}
modifier CheckIfTargetReached {
}
}