tx · B61NsM2LhKBSU36wXvVVABFLrQRefJLUhC3ETXyGT2Bi
3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK: -0.00700000 Waves
2022.08.27 23:16 [2203351] smart account 3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK > SELF 0.00000000 Waves
{
"type": 13,
"id": "B61NsM2LhKBSU36wXvVVABFLrQRefJLUhC3ETXyGT2Bi",
"fee": 700000,
"feeAssetId": null,
"timestamp": 1661631407349,
"version": 2,
"chainId": 84,
"sender": "3NA2sejUzEcL7Gg8WfhrcqxP22fHk2SS9pK",
"senderPublicKey": "HMzDczZUThMMhE2Grm1ZmpN3QNZ9N7CUCYnsqh4utSDJ",
"proofs": [
"3UjfkWT8mRonzmmBXb7swKCJVjxdEQCWNd8mAP1ie6iqcL8qgYZGUDKMUUBUaHsDCT58BcoMxXpwX6awrKBp2ykD"
],
"script": "base64:BgIYCAISABIAEgMKAQESAwoBARIAEgASABIABgAEdXNkbgEg11KRGPRfT6VehNuJvBkobHB7OMalzc+gLp7N2ofv42AABHVzZGMBIPQcuTcYg4l4Uh6IaJaLWyiuNgmUbeQfgPZEel3eCXgMAAxhZG1pbl93YWxsZXQCIzNOM0RDbmdqaWRpdmtKYlRKd0ZURXZiWVJUZmZDV1ZCTENMAA5hbGZhcmtfdGVzdG5ldAAFAAp2aXJlc19kYXBwARoBVHjn3floRCovnhXY1SHCQGibEg7rsYrFrAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAgBaQEPYnV5X3VzZG5fdGlja2V0AAMJAQIhPQIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdXNkbgkAAgECH1BsZWFzZSBkZXBvc2l0IFVTRC1OIHRva2VuIG9ubHkEC3VzZXJfY3JlZGl0CQENdHJ5R2V0SW50ZWdlcgEJAKwCAgkArAICAgV1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Z0ZXIgCQCkAwEJAGUCBQ5hbGZhcmtfdGVzdG5ldAUGYWxmYXJrAgYgYmxvY2sEDHVzZGNfYmFsYW5jZQkA8AcCBQR0aGlzBQR1c2RjCQDMCAIJAQxJbnRlZ2VyRW50cnkCAhZ1c2RjX3Byb2ZpdF9sYXN0X2Jsb2NrBRF0cmFuc2FjdGlvbl9ibG9jawkAzAgCCQEMSW50ZWdlckVudHJ5AgIXdXNkY19wcm9maXRfbGFzdF9hbW91bnQFDHVzZGNfYmFsYW5jZQUDbmlsAWkBF3VzZGNfc2VuZF9wcm9maXRfYW1vdW50AAQXdXNkY19wcm9maXRfbGFzdF9hbW91bnQJAQ10cnlHZXRJbnRlZ2VyAQIXdXNkY19wcm9maXRfbGFzdF9hbW91bnQDCQBnAgAABRd1c2RjX3Byb2ZpdF9sYXN0X2Ftb3VudAkAAgEJAKwCAgIceW91IGRvbnQgaGF2ZSBwcm9maXQgYW1vdW50IAkApAMBBRd1c2RjX3Byb2ZpdF9sYXN0X2Ftb3VudAQIdHJhbnNmZXIJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEFDGFkbWluX3dhbGxldAUXdXNkY19wcm9maXRfbGFzdF9hbW91bnQFBHVzZGMJAMwIAgUIdHJhbnNmZXIFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXktXhFB",
"height": 2203351,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BdxWrYCnJJezNwhL7WGAjXUKWAWLuV23ZzPPHkUHNjpf
Next: GHUr75suPFacRdHFdTxxUrGdvcRBUCgi7Z7QfdfSAdCL
Diff:
Old | New | | Differences |
---|
28 | 28 | | let new_user_credit = (user_credit + deposit_amount) |
---|
29 | 29 | | let all_credit = tryGetInteger("usdn_all_credit") |
---|
30 | 30 | | let new_all_credit = (all_credit + deposit_amount) |
---|
31 | | - | let transaction_block = match lastBlock.height { |
---|
| 31 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
32 | 32 | | case a: Int => |
---|
33 | 33 | | a |
---|
34 | 34 | | case _ => |
---|
35 | | - | throw("Error! with blochchain height") |
---|
| 35 | + | throw("Error block number") |
---|
36 | 36 | | } |
---|
37 | 37 | | let res = invoke(Address(vires_dapp), "usdN_stake", nil, [AttachedPayment(usdn, deposit_amount)]) |
---|
38 | 38 | | if ((res == res)) |
---|
39 | | - | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 39 | + | then { |
---|
| 40 | + | let vires_res = match res { |
---|
| 41 | + | case r: List[Any] => |
---|
| 42 | + | r |
---|
| 43 | + | case _ => |
---|
| 44 | + | throw() |
---|
| 45 | + | } |
---|
| 46 | + | if ((vires_res == vires_res)) |
---|
| 47 | + | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 48 | + | else throw("Strict value is not equal to itself.") |
---|
| 49 | + | } |
---|
40 | 50 | | else throw("Strict value is not equal to itself.") |
---|
41 | 51 | | } |
---|
42 | 52 | | |
---|
|
51 | 61 | | let new_user_credit = (user_credit + deposit_amount) |
---|
52 | 62 | | let all_credit = tryGetInteger("usdc_all_credit") |
---|
53 | 63 | | let new_all_credit = (all_credit + deposit_amount) |
---|
54 | | - | let transaction_block = match lastBlock.height { |
---|
| 64 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
55 | 65 | | case a: Int => |
---|
56 | 66 | | a |
---|
57 | 67 | | case _ => |
---|
|
59 | 69 | | } |
---|
60 | 70 | | let res = invoke(Address(vires_dapp), "usdC_stake", nil, [AttachedPayment(usdc, deposit_amount)]) |
---|
61 | 71 | | if ((res == res)) |
---|
62 | | - | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 72 | + | then { |
---|
| 73 | + | let vires_res = match res { |
---|
| 74 | + | case r: List[Any] => |
---|
| 75 | + | r |
---|
| 76 | + | case _ => |
---|
| 77 | + | throw("Incorrect invoke result") |
---|
| 78 | + | } |
---|
| 79 | + | if ((vires_res == vires_res)) |
---|
| 80 | + | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 81 | + | else throw("Strict value is not equal to itself.") |
---|
| 82 | + | } |
---|
63 | 83 | | else throw("Strict value is not equal to itself.") |
---|
64 | 84 | | } |
---|
65 | 85 | | |
---|
66 | 86 | | |
---|
67 | 87 | | |
---|
68 | 88 | | @Callable(i) |
---|
69 | | - | func sell_usdn_ticket (user_amount) = { |
---|
70 | | - | let amount = match user_amount { |
---|
71 | | - | case int: Int => |
---|
72 | | - | int |
---|
73 | | - | case _ => |
---|
74 | | - | 0 |
---|
75 | | - | } |
---|
| 89 | + | func sell_usdn_ticket (amount) = { |
---|
76 | 90 | | let user_credit = tryGetInteger((("usdn_" + toString(i.originCaller)) + "_credit")) |
---|
77 | 91 | | if ((amount > user_credit)) |
---|
78 | 92 | | then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(user_credit))) |
---|
|
80 | 94 | | let new_user_credit = (user_credit - amount) |
---|
81 | 95 | | let all_credit = tryGetInteger("usdn_all_credit") |
---|
82 | 96 | | let new_all_credit = (all_credit - amount) |
---|
83 | | - | let transaction_block = match lastBlock.height { |
---|
| 97 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
84 | 98 | | case a: Int => |
---|
85 | 99 | | a |
---|
86 | 100 | | case _ => |
---|
|
88 | 102 | | } |
---|
89 | 103 | | let res = invoke(Address(vires_dapp), "usdN_cancelStake", [amount], nil) |
---|
90 | 104 | | if ((res == res)) |
---|
91 | | - | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 105 | + | then { |
---|
| 106 | + | let vires_res = match res { |
---|
| 107 | + | case r: List[Any] => |
---|
| 108 | + | r |
---|
| 109 | + | case _ => |
---|
| 110 | + | throw("Incorrect invoke result") |
---|
| 111 | + | } |
---|
| 112 | + | if ((vires_res == vires_res)) |
---|
| 113 | + | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 114 | + | else throw("Strict value is not equal to itself.") |
---|
| 115 | + | } |
---|
92 | 116 | | else throw("Strict value is not equal to itself.") |
---|
93 | 117 | | } |
---|
94 | 118 | | } |
---|
|
104 | 128 | | let new_user_credit = (user_credit - amount) |
---|
105 | 129 | | let all_credit = tryGetInteger("usdc_all_credit") |
---|
106 | 130 | | let new_all_credit = (all_credit - amount) |
---|
107 | | - | let transaction_block = match lastBlock.height { |
---|
| 131 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
108 | 132 | | case a: Int => |
---|
109 | 133 | | a |
---|
110 | 134 | | case _ => |
---|
|
112 | 136 | | } |
---|
113 | 137 | | let res = invoke(Address(vires_dapp), "usdC_cancelStake", [amount], nil) |
---|
114 | 138 | | if ((res == res)) |
---|
115 | | - | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 139 | + | then { |
---|
| 140 | + | let vires_res = match res { |
---|
| 141 | + | case r: List[Any] => |
---|
| 142 | + | r |
---|
| 143 | + | case _ => |
---|
| 144 | + | throw("Incorrect invoke result") |
---|
| 145 | + | } |
---|
| 146 | + | if ((vires_res == vires_res)) |
---|
| 147 | + | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 148 | + | else throw("Strict value is not equal to itself.") |
---|
| 149 | + | } |
---|
116 | 150 | | else throw("Strict value is not equal to itself.") |
---|
117 | 151 | | } |
---|
118 | 152 | | } |
---|
|
125 | 159 | | else { |
---|
126 | 160 | | let usdn_profit_last_block = tryGetInteger("usdn_profit_last_block") |
---|
127 | 161 | | let usdn_profit_last_amount = tryGetInteger("usdn_profit_last_amount") |
---|
128 | | - | let transaction_block = match lastBlock.height { |
---|
| 162 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
129 | 163 | | case a: Int => |
---|
130 | 164 | | a |
---|
131 | 165 | | case _ => |
---|
|
149 | 183 | | then throw(("you dont have profit amount " + toString(usdn_profit_last_amount))) |
---|
150 | 184 | | else { |
---|
151 | 185 | | let transfer = ScriptTransfer(addressFromStringValue(admin_wallet), usdn_profit_last_amount, usdn) |
---|
152 | | - | [IntegerEntry("usdn_profit_last_amount", 0), transfer] |
---|
| 186 | + | [transfer] |
---|
153 | 187 | | } |
---|
154 | 188 | | } |
---|
155 | 189 | | |
---|
|
161 | 195 | | else { |
---|
162 | 196 | | let usdc_profit_last_block = tryGetInteger("usdc_profit_last_block") |
---|
163 | 197 | | let usdc_profit_last_amount = tryGetInteger("usdc_profit_last_amount") |
---|
164 | | - | let transaction_block = match lastBlock.height { |
---|
| 198 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
165 | 199 | | case a: Int => |
---|
166 | 200 | | a |
---|
167 | 201 | | case _ => |
---|
|
185 | 219 | | then throw(("you dont have profit amount " + toString(usdc_profit_last_amount))) |
---|
186 | 220 | | else { |
---|
187 | 221 | | let transfer = ScriptTransfer(addressFromStringValue(admin_wallet), usdc_profit_last_amount, usdc) |
---|
188 | | - | [IntegerEntry("usdn_profit_last_amount", 0), transfer] |
---|
| 222 | + | [transfer] |
---|
189 | 223 | | } |
---|
190 | 224 | | } |
---|
191 | 225 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let usdn = base58'FVXgJ86erBw5GAMeAw1CnYXwQn48BFAEAhRyHPUjbMQB' |
---|
5 | 5 | | |
---|
6 | 6 | | let usdc = base58'HRut8ESAGXxwvsKJky1V96qRtqyXQd4Apq4GY7TE5yGP' |
---|
7 | 7 | | |
---|
8 | 8 | | let admin_wallet = "3N3DCngjidivkJbTJwFTEvbYRTffCWVBLCL" |
---|
9 | 9 | | |
---|
10 | 10 | | let alfark_testnet = 5 |
---|
11 | 11 | | |
---|
12 | 12 | | let vires_dapp = base58'3MzwNdM8LQZEPXq3d4uXvxeZGpBwVQXs9RD' |
---|
13 | 13 | | |
---|
14 | 14 | | func tryGetInteger (key) = match getInteger(this, key) { |
---|
15 | 15 | | case b: Int => |
---|
16 | 16 | | b |
---|
17 | 17 | | case _ => |
---|
18 | 18 | | 0 |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(i) |
---|
23 | 23 | | func buy_usdn_ticket () = if ((i.payments[0].assetId != usdn)) |
---|
24 | 24 | | then throw("Please deposit USD-N token only") |
---|
25 | 25 | | else { |
---|
26 | 26 | | let user_credit = tryGetInteger((("usdn_" + toString(i.originCaller)) + "_credit")) |
---|
27 | 27 | | let deposit_amount = i.payments[0].amount |
---|
28 | 28 | | let new_user_credit = (user_credit + deposit_amount) |
---|
29 | 29 | | let all_credit = tryGetInteger("usdn_all_credit") |
---|
30 | 30 | | let new_all_credit = (all_credit + deposit_amount) |
---|
31 | | - | let transaction_block = match lastBlock.height { |
---|
| 31 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
32 | 32 | | case a: Int => |
---|
33 | 33 | | a |
---|
34 | 34 | | case _ => |
---|
35 | | - | throw("Error! with blochchain height") |
---|
| 35 | + | throw("Error block number") |
---|
36 | 36 | | } |
---|
37 | 37 | | let res = invoke(Address(vires_dapp), "usdN_stake", nil, [AttachedPayment(usdn, deposit_amount)]) |
---|
38 | 38 | | if ((res == res)) |
---|
39 | | - | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 39 | + | then { |
---|
| 40 | + | let vires_res = match res { |
---|
| 41 | + | case r: List[Any] => |
---|
| 42 | + | r |
---|
| 43 | + | case _ => |
---|
| 44 | + | throw() |
---|
| 45 | + | } |
---|
| 46 | + | if ((vires_res == vires_res)) |
---|
| 47 | + | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 48 | + | else throw("Strict value is not equal to itself.") |
---|
| 49 | + | } |
---|
40 | 50 | | else throw("Strict value is not equal to itself.") |
---|
41 | 51 | | } |
---|
42 | 52 | | |
---|
43 | 53 | | |
---|
44 | 54 | | |
---|
45 | 55 | | @Callable(i) |
---|
46 | 56 | | func buy_usdc_ticket () = if ((i.payments[0].assetId != usdc)) |
---|
47 | 57 | | then throw("Please deposit USD-N token only") |
---|
48 | 58 | | else { |
---|
49 | 59 | | let user_credit = tryGetInteger((("usdc_" + toString(i.originCaller)) + "_credit")) |
---|
50 | 60 | | let deposit_amount = i.payments[0].amount |
---|
51 | 61 | | let new_user_credit = (user_credit + deposit_amount) |
---|
52 | 62 | | let all_credit = tryGetInteger("usdc_all_credit") |
---|
53 | 63 | | let new_all_credit = (all_credit + deposit_amount) |
---|
54 | | - | let transaction_block = match lastBlock.height { |
---|
| 64 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
55 | 65 | | case a: Int => |
---|
56 | 66 | | a |
---|
57 | 67 | | case _ => |
---|
58 | 68 | | throw("Error block number") |
---|
59 | 69 | | } |
---|
60 | 70 | | let res = invoke(Address(vires_dapp), "usdC_stake", nil, [AttachedPayment(usdc, deposit_amount)]) |
---|
61 | 71 | | if ((res == res)) |
---|
62 | | - | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 72 | + | then { |
---|
| 73 | + | let vires_res = match res { |
---|
| 74 | + | case r: List[Any] => |
---|
| 75 | + | r |
---|
| 76 | + | case _ => |
---|
| 77 | + | throw("Incorrect invoke result") |
---|
| 78 | + | } |
---|
| 79 | + | if ((vires_res == vires_res)) |
---|
| 80 | + | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 81 | + | else throw("Strict value is not equal to itself.") |
---|
| 82 | + | } |
---|
63 | 83 | | else throw("Strict value is not equal to itself.") |
---|
64 | 84 | | } |
---|
65 | 85 | | |
---|
66 | 86 | | |
---|
67 | 87 | | |
---|
68 | 88 | | @Callable(i) |
---|
69 | | - | func sell_usdn_ticket (user_amount) = { |
---|
70 | | - | let amount = match user_amount { |
---|
71 | | - | case int: Int => |
---|
72 | | - | int |
---|
73 | | - | case _ => |
---|
74 | | - | 0 |
---|
75 | | - | } |
---|
| 89 | + | func sell_usdn_ticket (amount) = { |
---|
76 | 90 | | let user_credit = tryGetInteger((("usdn_" + toString(i.originCaller)) + "_credit")) |
---|
77 | 91 | | if ((amount > user_credit)) |
---|
78 | 92 | | then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(user_credit))) |
---|
79 | 93 | | else { |
---|
80 | 94 | | let new_user_credit = (user_credit - amount) |
---|
81 | 95 | | let all_credit = tryGetInteger("usdn_all_credit") |
---|
82 | 96 | | let new_all_credit = (all_credit - amount) |
---|
83 | | - | let transaction_block = match lastBlock.height { |
---|
| 97 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
84 | 98 | | case a: Int => |
---|
85 | 99 | | a |
---|
86 | 100 | | case _ => |
---|
87 | 101 | | throw("Error block number") |
---|
88 | 102 | | } |
---|
89 | 103 | | let res = invoke(Address(vires_dapp), "usdN_cancelStake", [amount], nil) |
---|
90 | 104 | | if ((res == res)) |
---|
91 | | - | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 105 | + | then { |
---|
| 106 | + | let vires_res = match res { |
---|
| 107 | + | case r: List[Any] => |
---|
| 108 | + | r |
---|
| 109 | + | case _ => |
---|
| 110 | + | throw("Incorrect invoke result") |
---|
| 111 | + | } |
---|
| 112 | + | if ((vires_res == vires_res)) |
---|
| 113 | + | then [IntegerEntry((("usdn_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdn_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdn_all_credit", new_all_credit), IntegerEntry("usdn_all_block", transaction_block)] |
---|
| 114 | + | else throw("Strict value is not equal to itself.") |
---|
| 115 | + | } |
---|
92 | 116 | | else throw("Strict value is not equal to itself.") |
---|
93 | 117 | | } |
---|
94 | 118 | | } |
---|
95 | 119 | | |
---|
96 | 120 | | |
---|
97 | 121 | | |
---|
98 | 122 | | @Callable(i) |
---|
99 | 123 | | func sell_usdc_ticket (amount) = { |
---|
100 | 124 | | let user_credit = tryGetInteger((("usdc_" + toString(i.originCaller)) + "_credit")) |
---|
101 | 125 | | if ((amount > user_credit)) |
---|
102 | 126 | | then throw(("sorry you can't withdraw this amount, because u=you have only " + toString(user_credit))) |
---|
103 | 127 | | else { |
---|
104 | 128 | | let new_user_credit = (user_credit - amount) |
---|
105 | 129 | | let all_credit = tryGetInteger("usdc_all_credit") |
---|
106 | 130 | | let new_all_credit = (all_credit - amount) |
---|
107 | | - | let transaction_block = match lastBlock.height { |
---|
| 131 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
108 | 132 | | case a: Int => |
---|
109 | 133 | | a |
---|
110 | 134 | | case _ => |
---|
111 | 135 | | throw("Error block number") |
---|
112 | 136 | | } |
---|
113 | 137 | | let res = invoke(Address(vires_dapp), "usdC_cancelStake", [amount], nil) |
---|
114 | 138 | | if ((res == res)) |
---|
115 | | - | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 139 | + | then { |
---|
| 140 | + | let vires_res = match res { |
---|
| 141 | + | case r: List[Any] => |
---|
| 142 | + | r |
---|
| 143 | + | case _ => |
---|
| 144 | + | throw("Incorrect invoke result") |
---|
| 145 | + | } |
---|
| 146 | + | if ((vires_res == vires_res)) |
---|
| 147 | + | then [IntegerEntry((("usdc_" + toString(i.originCaller)) + "_credit"), new_user_credit), IntegerEntry((("usdc_" + toString(i.originCaller)) + "_block"), transaction_block), IntegerEntry("usdc_all_credit", new_all_credit), IntegerEntry("usdc_all_block", transaction_block)] |
---|
| 148 | + | else throw("Strict value is not equal to itself.") |
---|
| 149 | + | } |
---|
116 | 150 | | else throw("Strict value is not equal to itself.") |
---|
117 | 151 | | } |
---|
118 | 152 | | } |
---|
119 | 153 | | |
---|
120 | 154 | | |
---|
121 | 155 | | |
---|
122 | 156 | | @Callable(i) |
---|
123 | 157 | | func usdn_calc_profit_amount () = if ((toString(i.originCaller) != admin_wallet)) |
---|
124 | 158 | | then throw("Sorry! you are not allowed to use this funaction") |
---|
125 | 159 | | else { |
---|
126 | 160 | | let usdn_profit_last_block = tryGetInteger("usdn_profit_last_block") |
---|
127 | 161 | | let usdn_profit_last_amount = tryGetInteger("usdn_profit_last_amount") |
---|
128 | | - | let transaction_block = match lastBlock.height { |
---|
| 162 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
129 | 163 | | case a: Int => |
---|
130 | 164 | | a |
---|
131 | 165 | | case _ => |
---|
132 | 166 | | throw("Error block number") |
---|
133 | 167 | | } |
---|
134 | 168 | | let alfark = (transaction_block - usdn_profit_last_block) |
---|
135 | 169 | | if ((alfark_testnet > alfark)) |
---|
136 | 170 | | then throw((("Please try again after " + toString((alfark_testnet - alfark))) + " block")) |
---|
137 | 171 | | else { |
---|
138 | 172 | | let usdn_balance = assetBalance(this, usdn) |
---|
139 | 173 | | [IntegerEntry("usdn_profit_last_block", transaction_block), IntegerEntry("usdn_profit_last_amount", usdn_balance)] |
---|
140 | 174 | | } |
---|
141 | 175 | | } |
---|
142 | 176 | | |
---|
143 | 177 | | |
---|
144 | 178 | | |
---|
145 | 179 | | @Callable(i) |
---|
146 | 180 | | func usdn_send_profit_amount () = { |
---|
147 | 181 | | let usdn_profit_last_amount = tryGetInteger("usdn_profit_last_amount") |
---|
148 | 182 | | if ((0 >= usdn_profit_last_amount)) |
---|
149 | 183 | | then throw(("you dont have profit amount " + toString(usdn_profit_last_amount))) |
---|
150 | 184 | | else { |
---|
151 | 185 | | let transfer = ScriptTransfer(addressFromStringValue(admin_wallet), usdn_profit_last_amount, usdn) |
---|
152 | | - | [IntegerEntry("usdn_profit_last_amount", 0), transfer] |
---|
| 186 | + | [transfer] |
---|
153 | 187 | | } |
---|
154 | 188 | | } |
---|
155 | 189 | | |
---|
156 | 190 | | |
---|
157 | 191 | | |
---|
158 | 192 | | @Callable(i) |
---|
159 | 193 | | func usdc_calc_profit_amount () = if ((toString(i.originCaller) != admin_wallet)) |
---|
160 | 194 | | then throw("Sorry! you are not allowed to use this funaction") |
---|
161 | 195 | | else { |
---|
162 | 196 | | let usdc_profit_last_block = tryGetInteger("usdc_profit_last_block") |
---|
163 | 197 | | let usdc_profit_last_amount = tryGetInteger("usdc_profit_last_amount") |
---|
164 | | - | let transaction_block = match lastBlock.height { |
---|
| 198 | + | let transaction_block = match transactionHeightById(i.transactionId) { |
---|
165 | 199 | | case a: Int => |
---|
166 | 200 | | a |
---|
167 | 201 | | case _ => |
---|
168 | 202 | | throw("Error block number") |
---|
169 | 203 | | } |
---|
170 | 204 | | let alfark = (transaction_block - usdc_profit_last_block) |
---|
171 | 205 | | if ((alfark_testnet > alfark)) |
---|
172 | 206 | | then throw((("Please try again after " + toString((alfark_testnet - alfark))) + " block")) |
---|
173 | 207 | | else { |
---|
174 | 208 | | let usdc_balance = assetBalance(this, usdc) |
---|
175 | 209 | | [IntegerEntry("usdc_profit_last_block", transaction_block), IntegerEntry("usdc_profit_last_amount", usdc_balance)] |
---|
176 | 210 | | } |
---|
177 | 211 | | } |
---|
178 | 212 | | |
---|
179 | 213 | | |
---|
180 | 214 | | |
---|
181 | 215 | | @Callable(i) |
---|
182 | 216 | | func usdc_send_profit_amount () = { |
---|
183 | 217 | | let usdc_profit_last_amount = tryGetInteger("usdc_profit_last_amount") |
---|
184 | 218 | | if ((0 >= usdc_profit_last_amount)) |
---|
185 | 219 | | then throw(("you dont have profit amount " + toString(usdc_profit_last_amount))) |
---|
186 | 220 | | else { |
---|
187 | 221 | | let transfer = ScriptTransfer(addressFromStringValue(admin_wallet), usdc_profit_last_amount, usdc) |
---|
188 | | - | [IntegerEntry("usdn_profit_last_amount", 0), transfer] |
---|
| 222 | + | [transfer] |
---|
189 | 223 | | } |
---|
190 | 224 | | } |
---|
191 | 225 | | |
---|
192 | 226 | | |
---|
193 | 227 | | @Verifier(tx) |
---|
194 | 228 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
195 | 229 | | |
---|