tx · 7dekVY7vbVv9zyP8BYShqG1GKJA1Lk1Woj5DPb8BUgTH
3N3k8kYqD1uZA9G5LxEPirYd2Ftpswpn9mC: -0.00600000 Waves
2022.06.18 15:10 [2101794] smart account 3N3k8kYqD1uZA9G5LxEPirYd2Ftpswpn9mC > SELF 0.00000000 Waves
{
"type": 13,
"id": "7dekVY7vbVv9zyP8BYShqG1GKJA1Lk1Woj5DPb8BUgTH",
"fee": 600000,
"feeAssetId": null,
"timestamp": 1655554165788,
"version": 2,
"chainId": 84,
"sender": "3N3k8kYqD1uZA9G5LxEPirYd2Ftpswpn9mC",
"senderPublicKey": "9W3FE2ufeMnkDdNiMMaE3x3X4nvSy1fftLMvf18Lv45R",
"proofs": [
"VPvKV1gQNefisBgVgP1VWexqv8AYvi6aTaAfUAzFiHCSmr2ERd4GRrPF3PDQEbQXoA1cyYqH2zEDFkG1CP1mMQi"
],
"script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQEAAAAFAAAAAAprRWdnSXNzdWVkAgAAAAl3YXNJbml0ZWQAAAAACGtBc3NldElkAgAAAA9uZXdCdWxsX2Fzc2V0SWQAAAAABm1hc3RlcgIAAAAjM040ZHVMcHZQMjd5aGpDdXdLMmI3ZmdRdnI4cWpIaG1QdnMAAAAADm1BY2NQS2V5U3RyaW5nAgAAACxGakg1WWZrbmhiUmh1dGpxWjJnazFkQmNtWTlmU29yQTlIVmgxQXZRVFE5VQAAAAAIbUFjY1BLZXkJAAJZAAAAAQUAAAAObUFjY1BLZXlTdHJpbmcAAAACAAAAAWkBAAAADGlzc3VlTmV3QnVsbAAAAAADCQEAAAACIT0AAAACCQAEIAAAAAEFAAAACmtFZ2dJc3N1ZWQFAAAABHVuaXQJAAACAAAAAQkAASwAAAACAgAAADROZXcgQlVMTCBFR0cgaXMgYWxyZWFkeSBpc3N1ZWQgYW5kIGl0cyBhc3NldCBpZCBpczogCQEAAAARQGV4dHJOYXRpdmUoMTA1OCkAAAABBQAAAAhrQXNzZXRJZAQ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ceWZ3eSZvkQxMbyyLp13gckrew2PJnruq
Next: 4DfEcJpCJizjRVhdQLXCLZ39Djk67b4YKMdGfxmM7Fne
Diff:
Old | New | | Differences |
---|
4 | 4 | | let kEggIssued = "wasInited" |
---|
5 | 5 | | |
---|
6 | 6 | | let kAssetId = "newBull_assetId" |
---|
| 7 | + | |
---|
| 8 | + | let master = "3N4duLpvP27yhjCuwK2b7fgQvr8qjHhmPvs" |
---|
| 9 | + | |
---|
| 10 | + | let mAccPKeyString = "FjH5YfknhbRhutjqZ2gk1dBcmY9fSorA9HVh1AvQTQ9U" |
---|
| 11 | + | |
---|
| 12 | + | let mAccPKey = fromBase58String(mAccPKeyString) |
---|
7 | 13 | | |
---|
8 | 14 | | @Callable(i) |
---|
9 | 15 | | func issueNewBull () = if ((getBoolean(kEggIssued) != unit)) |
---|
|
15 | 21 | | } |
---|
16 | 22 | | |
---|
17 | 23 | | |
---|
| 24 | + | |
---|
| 25 | + | @Callable(i) |
---|
| 26 | + | func reissueBull (amount) = if ((i.callerPublicKey != mAccPKey)) |
---|
| 27 | + | then throw("Master only!") |
---|
| 28 | + | else if ((1 > amount)) |
---|
| 29 | + | then throw("WTF!") |
---|
| 30 | + | else { |
---|
| 31 | + | let token = fromBase58String(kAssetId) |
---|
| 32 | + | let reissue = Reissue(token, amount, true) |
---|
| 33 | + | [reissue, ScriptTransfer(i.caller, amount, fromBase58String(kAssetId))] |
---|
| 34 | + | } |
---|
| 35 | + | |
---|
| 36 | + | |
---|
18 | 37 | | @Verifier(tx) |
---|
19 | 38 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
20 | 39 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let kEggIssued = "wasInited" |
---|
5 | 5 | | |
---|
6 | 6 | | let kAssetId = "newBull_assetId" |
---|
| 7 | + | |
---|
| 8 | + | let master = "3N4duLpvP27yhjCuwK2b7fgQvr8qjHhmPvs" |
---|
| 9 | + | |
---|
| 10 | + | let mAccPKeyString = "FjH5YfknhbRhutjqZ2gk1dBcmY9fSorA9HVh1AvQTQ9U" |
---|
| 11 | + | |
---|
| 12 | + | let mAccPKey = fromBase58String(mAccPKeyString) |
---|
7 | 13 | | |
---|
8 | 14 | | @Callable(i) |
---|
9 | 15 | | func issueNewBull () = if ((getBoolean(kEggIssued) != unit)) |
---|
10 | 16 | | then throw(("New BULL EGG is already issued and its asset id is: " + getStringValue(kAssetId))) |
---|
11 | 17 | | else { |
---|
12 | 18 | | let newBull = Issue("Bull Egg", "Utility and Reward token @ Duck Riders clan. The eggiest token in the world.", 100000, 8, true, unit, 0) |
---|
13 | 19 | | let newBullId = calculateAssetId(newBull) |
---|
14 | 20 | | [newBull, StringEntry(kAssetId, toBase58String(newBullId))] |
---|
15 | 21 | | } |
---|
16 | 22 | | |
---|
17 | 23 | | |
---|
| 24 | + | |
---|
| 25 | + | @Callable(i) |
---|
| 26 | + | func reissueBull (amount) = if ((i.callerPublicKey != mAccPKey)) |
---|
| 27 | + | then throw("Master only!") |
---|
| 28 | + | else if ((1 > amount)) |
---|
| 29 | + | then throw("WTF!") |
---|
| 30 | + | else { |
---|
| 31 | + | let token = fromBase58String(kAssetId) |
---|
| 32 | + | let reissue = Reissue(token, amount, true) |
---|
| 33 | + | [reissue, ScriptTransfer(i.caller, amount, fromBase58String(kAssetId))] |
---|
| 34 | + | } |
---|
| 35 | + | |
---|
| 36 | + | |
---|
18 | 37 | | @Verifier(tx) |
---|
19 | 38 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
20 | 39 | | |
---|