tx · F61tAFVj4TJFMucnXVUNYohvEtbHMkSKzCQYwFp2k25h

3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD:  -0.00200000 Waves

2022.08.10 16:32 [2178406] smart account 3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD > SELF 0.00000000 Waves

{ "type": 13, "id": "F61tAFVj4TJFMucnXVUNYohvEtbHMkSKzCQYwFp2k25h", "fee": 200000, "feeAssetId": null, "timestamp": 1660138322987, "version": 2, "chainId": 84, "sender": "3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD", "senderPublicKey": "CU5wMqCBg4bC4Zgs8QGiqjjvmeMkSiKo3Ff6k5axJZwr", "proofs": [ "23tB5ywQRwUD3JH356Uo4FoBT5xxVM9xeZx1eyJa8fCiV5UrVzuRESwMENHnfRiHhf1SuTEgsWPCW9Jr32bkcQvV" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEBEgMKAQESAAAAAAMAAAAABWd3VXNkAQAAACDW13fJXlJX/2xNGc+5vtn/z7mBbzdm0MCL0wi8QnYljQAAAAAEdXNkbgEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAAACHVzZG5EYXBwAQAAABoBVPur6llNFgAG1sjmCjo7cFrAmCOCclpNVQAAAAMAAAABaQEAAAAPc3dhcEdHdXNkVG9Vc2RuAAAAAQAAAAZhbW91bnQEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAFZ3dVc2QJAAACAAAAAQIAAAApT25seSBnd1VzZCB0b2tlbiBpcyBhbGxvd2VkIGZvciBzd2FwcGluZy4EAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQ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l2ZSgxMDYyKQAAAAECAAAAIzNOQ3JvS3hwQ1dDWWlqd2ppVkJnNmhjMlQ3RGFhanJIdUJyAgAAAANwdXQFAAAAA25pbAgFAAAAAWkAAAAIcGF5bWVudHMDCQAAAAAAAAIFAAAAA3JlcwUAAAADcmVzBAAAAAckbWF0Y2gwBQAAAANyZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABcgUAAAAHJG1hdGNoMAkABRQAAAACBQAAAANuaWwAAAAAAAAAAAAJAAACAAAAAQIAAAAXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAJwEaWA=", "height": 2178406, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DwXnTUY4ffzZhT3AuCV6kbwumMWtPBpEbcXRqoDGw38F Next: none Diff:
OldNewDifferences
5252 then throw("Only usdn token is allowed for staking.")
5353 else {
5454 let res = invoke(addressFromStringValue("3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr"), "put", nil, i.payments)
55- match res {
56- case _ =>
57- throw("Incorrect invoke result")
58- }
55+ if ((res == res))
56+ then match res {
57+ case r: Int =>
58+ $Tuple2(nil, 0)
59+ case _ =>
60+ throw("Incorrect invoke result")
61+ }
62+ else throw("Strict value is not equal to itself.")
5963 }
6064 }
6165
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let gwUsd = base58'FTeosv2BmZED7kBcGnqDy9tba1VdkeodQveSAATMQusJ'
55
66 let usdn = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
77
88 let usdnDapp = base58'3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr'
99
1010 @Callable(i)
1111 func swapGGusdToUsdn (amount) = {
1212 let pmt = value(i.payments[0])
1313 if ((pmt.assetId != gwUsd))
1414 then throw("Only gwUsd token is allowed for swapping.")
1515 else {
1616 let currentKey = toBase58String(i.caller.bytes)
1717 let currentAmount = match getInteger(this, currentKey) {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 [ScriptTransfer(i.caller, amount, usdn)]
2424 }
2525 }
2626
2727
2828
2929 @Callable(i)
3030 func swapUsdnToGGusd (amount) = {
3131 let pmt = value(i.payments[0])
3232 if ((pmt.assetId != usdn))
3333 then throw("Only usdn token is allowed for swapping.")
3434 else {
3535 let currentKey = toBase58String(i.caller.bytes)
3636 let currentAmount = match getInteger(this, currentKey) {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
4242 [ScriptTransfer(i.caller, amount, gwUsd)]
4343 }
4444 }
4545
4646
4747
4848 @Callable(i)
4949 func putUsdnLp () = {
5050 let pmt = value(i.payments[0])
5151 if ((pmt.assetId != usdn))
5252 then throw("Only usdn token is allowed for staking.")
5353 else {
5454 let res = invoke(addressFromStringValue("3NCroKxpCWCYijwjiVBg6hc2T7DaajrHuBr"), "put", nil, i.payments)
55- match res {
56- case _ =>
57- throw("Incorrect invoke result")
58- }
55+ if ((res == res))
56+ then match res {
57+ case r: Int =>
58+ $Tuple2(nil, 0)
59+ case _ =>
60+ throw("Incorrect invoke result")
61+ }
62+ else throw("Strict value is not equal to itself.")
5963 }
6064 }
6165
6266

github/deemru/w8io/169f3d6 
30.02 ms