tx · AHsRxHZqML38ooraMUyBNd5Xf2x4W8BF8o9MCj7dLqZy
3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH: -0.05000000 Waves
2022.04.08 15:53 [1999621] smart account 3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH > SELF 0.00000000 Waves
{
"type": 13,
"id": "AHsRxHZqML38ooraMUyBNd5Xf2x4W8BF8o9MCj7dLqZy",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1649422400533,
"version": 2,
"chainId": 84,
"sender": "3Mv7nXq2V2Dnn9oSkB5feRt6RxtqnPiAXNH",
"senderPublicKey": "HJ4JLtArYaaiBiWho6gzLRbKUVM6ZVTaKmci6sgFQtEm",
"proofs": [
"28GNeh1ajMnST3D5nF8BsxxwV5h2UErTpMRwv6kijC6bQwChXGxmmpezst6n4NQ8Lw6J14o5HmQv6n4TSoNwhPvk"
],
"script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAwAAAAACSUQBAAAAIP8QR3aaHO4gAEH6GV3RAr44yVLBwb023LSVkrkR45liAAAAAAJMUAEAAAAgVICYp/GT+FfvfSZYAZKhhCXeJCqcu2y/TJ9L8R1cyz8AAAAACWlzU3RvcHBlZAcAAAABAAAAAWkBAAAABXN0YWtlAAAAAAQAAAADcG10CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAlwbXRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50AwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAJJRAkAAAIAAAABAgAAABthdHRhY2ggdGVzdE5TQlQgdG9rZW5zIG9ubHkDBQAAAAlpc1N0b3BwZWQJAAACAAAAAQIAAAAZc21hcnQgY29udHJhY3QgaXMgb24gbG9jawQAAAAKaW5UcmVhc3VyeQkAA/AAAAACBQAAAAR0aGlzBQAAAAJJRAQAAAALdG90YWxJc3N1ZWQEAAAAByRtYXRjaDAJAAPsAAAAAQUAAAACTFADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABUFzc2V0BAAAAAVhc3NldAUAAAAHJG1hdGNoMAgFAAAABWFzc2V0AAAACHF1YW50aXR5CQAAAgAAAAECAAAAEENhbid0IGZpbmQgYXNzZXQEAAAAB3RvSXNzdWUJAABpAAAAAgUAAAAKaW5UcmVhc3VyeQUAAAALdG90YWxJc3N1ZWQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAAJMUAUAAAAHdG9Jc3N1ZQYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAd0b0lzc3VlBQAAAAJMUAUAAAADbmlsAAAAAFAfEeM=",
"height": 1999621,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 7nT47dFUt85V6BUwnrfgjbojVw2BEJQA3CCiZTadF2LH
Next: FjvegMYvh3kBJGBJMSXDAqTxZwyWLXTz7syrJ7GKntDP
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let ID = base58'' |
---|
| 4 | + | let ID = base58'JAfMu2seKNzTVfqi5w5Pjh4kwwPTZPCEFpc2q2vDyFeh' |
---|
5 | 5 | | |
---|
6 | | - | let LP = base58'' |
---|
| 6 | + | let LP = base58'6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU' |
---|
7 | 7 | | |
---|
8 | 8 | | let isStopped = false |
---|
9 | 9 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let ID = base58'' |
---|
| 4 | + | let ID = base58'JAfMu2seKNzTVfqi5w5Pjh4kwwPTZPCEFpc2q2vDyFeh' |
---|
5 | 5 | | |
---|
6 | | - | let LP = base58'' |
---|
| 6 | + | let LP = base58'6gryiTrJoLkNzBtZLVBuCyCvnxPY77TVUS2ouYYjjVTU' |
---|
7 | 7 | | |
---|
8 | 8 | | let isStopped = false |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(i) |
---|
11 | 11 | | func stake () = { |
---|
12 | 12 | | let pmt = i.payments[0] |
---|
13 | 13 | | let pmtAmount = pmt.amount |
---|
14 | 14 | | if ((pmt.assetId != ID)) |
---|
15 | 15 | | then throw("attach testNSBT tokens only") |
---|
16 | 16 | | else if (isStopped) |
---|
17 | 17 | | then throw("smart contract is on lock") |
---|
18 | 18 | | else { |
---|
19 | 19 | | let inTreasury = assetBalance(this, ID) |
---|
20 | 20 | | let totalIssued = match assetInfo(LP) { |
---|
21 | 21 | | case asset: Asset => |
---|
22 | 22 | | asset.quantity |
---|
23 | 23 | | case _ => |
---|
24 | 24 | | throw("Can't find asset") |
---|
25 | 25 | | } |
---|
26 | 26 | | let toIssue = (inTreasury / totalIssued) |
---|
27 | 27 | | [Reissue(LP, toIssue, true), ScriptTransfer(i.caller, toIssue, LP)] |
---|
28 | 28 | | } |
---|
29 | 29 | | } |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|