tx · 2bshhxANTU5k5nAcGRpTZTVCN6ahxgg7DKRjizRwvHww
3PDdgjsD1xqR8M3vLicvmGKFFpMmTmzaDKG: -0.01000000 Waves
2022.12.19 11:03 [3432387] smart account 3PDdgjsD1xqR8M3vLicvmGKFFpMmTmzaDKG > SELF 0.00000000 Waves
{
"type": 13,
"id": "2bshhxANTU5k5nAcGRpTZTVCN6ahxgg7DKRjizRwvHww",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1671436975575,
"version": 2,
"chainId": 87,
"sender": "3PDdgjsD1xqR8M3vLicvmGKFFpMmTmzaDKG",
"senderPublicKey": "93tJorHW7GhHCiJR2XgkcZYrscErSuxXLF9JXkLrxXJd",
"proofs": [
"2CunAQHYyzdWApPesHtzuZeeCJJ3sQgwB234Gkdph9gXMFhzKjS4FiW7EVu3cY8T5QBqiyrg8NvVLW235mZzi932"
],
"script": "base64:BgIHCAISAwoBAQQABmFkbWluMQkBB0FkZHJlc3MBARoBVxKIOQ1Xdg411ANBy2CqJPBIKhf45KVAVwAGYWRtaW4yCQEHQWRkcmVzcwEBGgFXrL2OQA6UlKUxdUZb+TaaB4lKZhCqisQRAQdhbGxvd2VkAQZjYWxsZXIDCQAAAgUGY2FsbGVyBQZhZG1pbjEAAQMJAAACBQZjYWxsZXIFBmFkbWluMgACAAABBGNmZWUBAWkDCQBmAggFAWkDZmVlAIDC1y8GAwkBAiE9AggFAWkKZmVlQXNzZXRJZAUEdW5pdAYHAQFpAQNzbWYBAWYDCQAAAgkBBGNmZWUBBQFpBgkAAgECCUZlZSBFcnJvcgQHZ3JhbnRlZAkBB2FsbG93ZWQBCAUBaQZjYWxsZXIDCQAAAgUHZ3JhbnRlZAAACQACAQITT25seSBhZG1pbnMgYWxsb3dlZAMJAAACBQdncmFudGVkAAEJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUGYWRtaW4xBQFmBQR1bml0BQNuaWwDCQAAAgUHZ3JhbnRlZAACCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFBmFkbWluMgUBZgUEdW5pdAUDbmlsBQNuaWwArOoJLw==",
"height": 3432387,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Ckdu2WEdf2dQj9zL5AcAf3VhRM4CyW3psXZnU8RbhMrr
Next: HLdtiqJRLidm92toU5Yn8swqH7jBKi6oqfvEFu6uKazX
Diff:
Old | New | | Differences |
---|
12 | 12 | | else 0 |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
| 15 | + | func cfee (i) = if ((i.fee > 100000000)) |
---|
| 16 | + | then true |
---|
| 17 | + | else if ((i.feeAssetId != unit)) |
---|
| 18 | + | then true |
---|
| 19 | + | else false |
---|
| 20 | + | |
---|
| 21 | + | |
---|
15 | 22 | | @Callable(i) |
---|
16 | | - | func smf (f) = { |
---|
17 | | - | let granted = allowed(i.caller) |
---|
18 | | - | if ((granted == 0)) |
---|
19 | | - | then throw("Only admins allowed") |
---|
20 | | - | else if ((granted == 1)) |
---|
21 | | - | then [ScriptTransfer(admin1, f, unit)] |
---|
22 | | - | else if ((granted == 2)) |
---|
23 | | - | then [ScriptTransfer(admin2, f, unit)] |
---|
24 | | - | else nil |
---|
25 | | - | } |
---|
| 23 | + | func smf (f) = if ((cfee(i) == true)) |
---|
| 24 | + | then throw("Fee Error") |
---|
| 25 | + | else { |
---|
| 26 | + | let granted = allowed(i.caller) |
---|
| 27 | + | if ((granted == 0)) |
---|
| 28 | + | then throw("Only admins allowed") |
---|
| 29 | + | else if ((granted == 1)) |
---|
| 30 | + | then [ScriptTransfer(admin1, f, unit)] |
---|
| 31 | + | else if ((granted == 2)) |
---|
| 32 | + | then [ScriptTransfer(admin2, f, unit)] |
---|
| 33 | + | else nil |
---|
| 34 | + | } |
---|
26 | 35 | | |
---|
27 | 36 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let admin1 = Address(base58'3P3ct5dTqVmei17Y55rnC6rxqiZhtQmdc9U') |
---|
5 | 5 | | |
---|
6 | 6 | | let admin2 = Address(base58'3PHgG2oLDGv9xMzacVTcc5yMtrJsvZYryng') |
---|
7 | 7 | | |
---|
8 | 8 | | func allowed (caller) = if ((caller == admin1)) |
---|
9 | 9 | | then 1 |
---|
10 | 10 | | else if ((caller == admin2)) |
---|
11 | 11 | | then 2 |
---|
12 | 12 | | else 0 |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
| 15 | + | func cfee (i) = if ((i.fee > 100000000)) |
---|
| 16 | + | then true |
---|
| 17 | + | else if ((i.feeAssetId != unit)) |
---|
| 18 | + | then true |
---|
| 19 | + | else false |
---|
| 20 | + | |
---|
| 21 | + | |
---|
15 | 22 | | @Callable(i) |
---|
16 | | - | func smf (f) = { |
---|
17 | | - | let granted = allowed(i.caller) |
---|
18 | | - | if ((granted == 0)) |
---|
19 | | - | then throw("Only admins allowed") |
---|
20 | | - | else if ((granted == 1)) |
---|
21 | | - | then [ScriptTransfer(admin1, f, unit)] |
---|
22 | | - | else if ((granted == 2)) |
---|
23 | | - | then [ScriptTransfer(admin2, f, unit)] |
---|
24 | | - | else nil |
---|
25 | | - | } |
---|
| 23 | + | func smf (f) = if ((cfee(i) == true)) |
---|
| 24 | + | then throw("Fee Error") |
---|
| 25 | + | else { |
---|
| 26 | + | let granted = allowed(i.caller) |
---|
| 27 | + | if ((granted == 0)) |
---|
| 28 | + | then throw("Only admins allowed") |
---|
| 29 | + | else if ((granted == 1)) |
---|
| 30 | + | then [ScriptTransfer(admin1, f, unit)] |
---|
| 31 | + | else if ((granted == 2)) |
---|
| 32 | + | then [ScriptTransfer(admin2, f, unit)] |
---|
| 33 | + | else nil |
---|
| 34 | + | } |
---|
26 | 35 | | |
---|
27 | 36 | | |
---|