tx · 4mAyYnJYcyaPBd2cG48JLmsfg1nxPPmXDZYjWxPUZYjN 3P7Z9oL3RbAmbLMYXBgH8VDwV1WvBPRxA8A: -0.01000000 Waves 2022.12.15 01:37 [3426063] smart account 3P7Z9oL3RbAmbLMYXBgH8VDwV1WvBPRxA8A > SELF 0.00000000 Waves
{ "type": 13, "id": "4mAyYnJYcyaPBd2cG48JLmsfg1nxPPmXDZYjWxPUZYjN", "fee": 1000000, "feeAssetId": null, "timestamp": 1671057465191, "version": 2, "chainId": 87, "sender": "3P7Z9oL3RbAmbLMYXBgH8VDwV1WvBPRxA8A", "senderPublicKey": "DUz1GAzDwKaHhNYQcYqWJPoAw5mRuva3c2KuvHDmpNnb", "proofs": [ "4pFCHcYqGXCjS3BmtTx2jo4ThhxR4k6wW4bsusRQX5SeXm6V5vUsi2v2kutW6z2u9vxKtZn7JqxS1cEJFdZezXco" ], "script": "base64:BgIECAISAAMAClVTRE5fQVNTRVQBILYmKcME9c5TkaQOS3UkL2SMUbH6369UKb1I0h0qsqrRAAxhZG1pbkFkZHJlc3MJAQdBZGRyZXNzAQEaAVdcAXEwaYF9YieZEq/wHiHIT/pHbTUZfoMAA2ZlZQAHAQFpAQFiAAQQd2l0aGRyYXdhbEFtb3VudAkA/AcECQEHQWRkcmVzcwEBGgFXdRLdk4IPW94ldhU5y0nVH1MoCcTocV4nAhV3aXRoZHJhd1Zlc3RlZEFsbFVTRE4JAMwIAgcJAMwIAgYFA25pbAUDbmlsAwkAAAIFEHdpdGhkcmF3YWxBbW91bnQFEHdpdGhkcmF3YWxBbW91bnQEByRtYXRjaDAFEHdpdGhkcmF3YWxBbW91bnQDCQABAgUHJG1hdGNoMAIDSW50BAZhbW91bnQFByRtYXRjaDAECWZlZUFtb3VudAkAawMFBmFtb3VudAUDZmVlAGQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUMYWRtaW5BZGRyZXNzBQlmZWVBbW91bnQFClVTRE5fQVNTRVQFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDADCQAAAgkApAgBCAUDaW52BGRBcHAFBHRoaXMGCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V59q3R6Q==", "height": 3426063, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3QD3RGBATg8JzsgeP7tW85wkG833X3zfSerESR3vLFyn Next: HMUsY5HwwxE8A1RoWrXY9RPUhmj11yM1wJ31HQBjVtLY Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN_ASSET = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | - | let | |
6 | + | let adminAddress = Address(base58'3PAKNd6ZXGLhP1k6VemDYYC8kGCcs5kikJ6') | |
7 | 7 | ||
8 | - | let adminAddress = Address(base58'3P3ct5dTqVmei17Y55rnC6rxqiZhtQmdc9U') | |
9 | - | ||
10 | - | let fee = 15 | |
8 | + | let fee = 7 | |
11 | 9 | ||
12 | 10 | @Callable(i) | |
13 | - | func vf (whale,regular) = if ((i.caller != adminAddress)) | |
14 | - | then throw("only admin allowed") | |
15 | - | else { | |
16 | - | let withdrawalAmount = invoke(vestingDapp, "withdrawVestedAllUSDN", [whale, regular], nil) | |
17 | - | if ((withdrawalAmount == withdrawalAmount)) | |
18 | - | then match withdrawalAmount { | |
19 | - | case amount: Int => | |
20 | - | let feeAmount = fraction(amount, fee, 100) | |
11 | + | func b () = { | |
12 | + | let withdrawalAmount = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "withdrawVestedAllUSDN", [false, true], nil) | |
13 | + | if ((withdrawalAmount == withdrawalAmount)) | |
14 | + | then match withdrawalAmount { | |
15 | + | case amount: Int => | |
16 | + | let feeAmount = fraction(amount, fee, 100) | |
21 | 17 | [ScriptTransfer(adminAddress, feeAmount, USDN_ASSET)] | |
22 | - | case _ => | |
23 | - | throw("Strict value is not equal to itself.") | |
24 | - | } | |
25 | - | else throw("Strict value is not equal to itself.") | |
18 | + | case _ => | |
19 | + | throw("Strict value is not equal to itself.") | |
26 | 20 | } | |
21 | + | else throw("Strict value is not equal to itself.") | |
22 | + | } | |
27 | 23 | ||
24 | + | ||
25 | + | @Verifier(tx) | |
26 | + | func verify () = match tx { | |
27 | + | case inv: InvokeScriptTransaction => | |
28 | + | if ((addressFromRecipient(inv.dApp) == this)) | |
29 | + | then true | |
30 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
31 | + | case _ => | |
32 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
33 | + | } | |
28 | 34 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let USDN_ASSET = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
5 | 5 | ||
6 | - | let | |
6 | + | let adminAddress = Address(base58'3PAKNd6ZXGLhP1k6VemDYYC8kGCcs5kikJ6') | |
7 | 7 | ||
8 | - | let adminAddress = Address(base58'3P3ct5dTqVmei17Y55rnC6rxqiZhtQmdc9U') | |
9 | - | ||
10 | - | let fee = 15 | |
8 | + | let fee = 7 | |
11 | 9 | ||
12 | 10 | @Callable(i) | |
13 | - | func vf (whale,regular) = if ((i.caller != adminAddress)) | |
14 | - | then throw("only admin allowed") | |
15 | - | else { | |
16 | - | let withdrawalAmount = invoke(vestingDapp, "withdrawVestedAllUSDN", [whale, regular], nil) | |
17 | - | if ((withdrawalAmount == withdrawalAmount)) | |
18 | - | then match withdrawalAmount { | |
19 | - | case amount: Int => | |
20 | - | let feeAmount = fraction(amount, fee, 100) | |
11 | + | func b () = { | |
12 | + | let withdrawalAmount = invoke(Address(base58'3PCbvPVQfSvVu88ip8Fm5YjwJhjEYk1Txhk'), "withdrawVestedAllUSDN", [false, true], nil) | |
13 | + | if ((withdrawalAmount == withdrawalAmount)) | |
14 | + | then match withdrawalAmount { | |
15 | + | case amount: Int => | |
16 | + | let feeAmount = fraction(amount, fee, 100) | |
21 | 17 | [ScriptTransfer(adminAddress, feeAmount, USDN_ASSET)] | |
22 | - | case _ => | |
23 | - | throw("Strict value is not equal to itself.") | |
24 | - | } | |
25 | - | else throw("Strict value is not equal to itself.") | |
18 | + | case _ => | |
19 | + | throw("Strict value is not equal to itself.") | |
26 | 20 | } | |
21 | + | else throw("Strict value is not equal to itself.") | |
22 | + | } | |
27 | 23 | ||
24 | + | ||
25 | + | @Verifier(tx) | |
26 | + | func verify () = match tx { | |
27 | + | case inv: InvokeScriptTransaction => | |
28 | + | if ((addressFromRecipient(inv.dApp) == this)) | |
29 | + | then true | |
30 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
31 | + | case _ => | |
32 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
33 | + | } | |
28 | 34 |
github/deemru/w8io/3ef1775 31.18 ms ◑