tx · AfSGbYqah4mgbsK6NeBe6QniotEtCECWtZrvrrT1EGx9
3NA1S6uwLYcgcU5Rie6zWuKyn1wkBj3rtPx: -0.01400000 Waves
2022.04.01 10:47 [1989246] smart account 3NA1S6uwLYcgcU5Rie6zWuKyn1wkBj3rtPx > SELF 0.00000000 Waves
{
"type": 13,
"id": "AfSGbYqah4mgbsK6NeBe6QniotEtCECWtZrvrrT1EGx9",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1648799261002,
"version": 2,
"chainId": 84,
"sender": "3NA1S6uwLYcgcU5Rie6zWuKyn1wkBj3rtPx",
"senderPublicKey": "BEvKqo77hZXfjdJwYSy7cbmNjN6dL4yKhwZvJDFKPiee",
"proofs": [
"5o2tAJSAgnKriQyPjWG6W2UhzoBBqJ7bwWywAzfgBmcvB2Y4AZBjcqzoFYAir6h7oUeB9uZ3KMDu5MJeRrHs2JtN"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAABAAAAAAEdXNkbgEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAAAB3Nuc2J0SWQBAAAAILqDvGkp6waDXTwTuaKB/jW6h/tkvZs4MAj0Aq5ZzFKzAAAAAAlpc1N0b3BwZWQHAAAAAAhyZWNlaXZlcgEAAAAaAVREB1pAb+J/pyN/gYjTyGw4FQkpHHvIQAIAAAABAAAAAWkBAAAADlVTRE50b1RyZWFzdXJ5AAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAZhbW91bnQIBQAAAANwbXQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAR1c2RuCQAAAgAAAAECAAAAFmF0dGFjaCBVU0ROIHRva2VuIG9ubHkDBQAAAAlpc1N0b3BwZWQJAAACAAAAAQIAAAAZc21hcnQgY29udHJhY3QgaXMgb24gbG9jawQAAAAKc25zYnRJc3N1ZQkBAAAAB1JlaXNzdWUAAAADBQAAAAdzbnNidElkBQAAAAZhbW91bnQGBAAAAAh0cmFuc2ZlcgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVEQHWkBv4n+nI3+BiNPIbDgVCSkce8hAAgUAAAAGYW1vdW50BQAAAAR1c2RuCQAETAAAAAIFAAAACHRyYW5zZmVyCQAETAAAAAIFAAAACnNuc2J0SXNzdWUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAAB3Nuc2J0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5V6Rhzg==",
"height": 1989246,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 7BBbGfpRugqw61L7Y8M3J8nvi7vsUnA6GEmridsYaYt
Next: none
Diff:
Old | New | | Differences |
---|
7 | 7 | | |
---|
8 | 8 | | let isStopped = false |
---|
9 | 9 | | |
---|
| 10 | + | let receiver = base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH' |
---|
| 11 | + | |
---|
10 | 12 | | @Callable(i) |
---|
11 | | - | func NSBT () = { |
---|
| 13 | + | func USDNtoTreasury () = { |
---|
12 | 14 | | let pmt = value(i.payments[0]) |
---|
13 | 15 | | let amount = pmt.amount |
---|
14 | 16 | | if ((pmt.assetId != usdn)) |
---|
|
17 | 19 | | then throw("smart contract is on lock") |
---|
18 | 20 | | else { |
---|
19 | 21 | | let snsbtIssue = Reissue(snsbtId, amount, true) |
---|
20 | | - | [snsbtIssue, ScriptTransfer(i.caller, amount, snsbtId)] |
---|
| 22 | + | let transfer = ScriptTransfer(Address(base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH'), amount, usdn) |
---|
| 23 | + | [transfer, snsbtIssue, ScriptTransfer(i.caller, amount, snsbtId)] |
---|
21 | 24 | | } |
---|
22 | 25 | | } |
---|
23 | 26 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let usdn = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' |
---|
5 | 5 | | |
---|
6 | 6 | | let snsbtId = base58'DZ5LhvfGCEAFRmfcrtdjhhiLESBfN7dMvM8FEFQc6Qr6' |
---|
7 | 7 | | |
---|
8 | 8 | | let isStopped = false |
---|
9 | 9 | | |
---|
| 10 | + | let receiver = base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH' |
---|
| 11 | + | |
---|
10 | 12 | | @Callable(i) |
---|
11 | | - | func NSBT () = { |
---|
| 13 | + | func USDNtoTreasury () = { |
---|
12 | 14 | | let pmt = value(i.payments[0]) |
---|
13 | 15 | | let amount = pmt.amount |
---|
14 | 16 | | if ((pmt.assetId != usdn)) |
---|
15 | 17 | | then throw("attach USDN token only") |
---|
16 | 18 | | else if (isStopped) |
---|
17 | 19 | | then throw("smart contract is on lock") |
---|
18 | 20 | | else { |
---|
19 | 21 | | let snsbtIssue = Reissue(snsbtId, amount, true) |
---|
20 | | - | [snsbtIssue, ScriptTransfer(i.caller, amount, snsbtId)] |
---|
| 22 | + | let transfer = ScriptTransfer(Address(base58'3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH'), amount, usdn) |
---|
| 23 | + | [transfer, snsbtIssue, ScriptTransfer(i.caller, amount, snsbtId)] |
---|
21 | 24 | | } |
---|
22 | 25 | | } |
---|
23 | 26 | | |
---|
24 | 27 | | |
---|
25 | 28 | | @Verifier(tx) |
---|
26 | 29 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
27 | 30 | | |
---|