tx · H7EoZQaVRL8HDV2fYEhUCntuXMkVVhMz16qvorG1PB8D
3Ms7bYkaAcmqLeUpYEENY9iyspidQjtRjwT: -0.01000000 Waves
2023.05.27 20:47 [2596692] smart account 3Ms7bYkaAcmqLeUpYEENY9iyspidQjtRjwT > SELF 0.00000000 Waves
{
"type": 13,
"id": "H7EoZQaVRL8HDV2fYEhUCntuXMkVVhMz16qvorG1PB8D",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1685209700523,
"version": 2,
"chainId": 84,
"sender": "3Ms7bYkaAcmqLeUpYEENY9iyspidQjtRjwT",
"senderPublicKey": "CFMpQ5j4gCMWsbFcF1wZyr4EeuhsKrdq1W3zSiQBjDvG",
"proofs": [
"3mcPqMC8HuRyFw2W4nJaiRBWDAVeiirBK4Lo4nZu5MD29hJ8qdbtXUQfXqP8keVozyGHUPX1nFbM9wcwpf7UYbsg"
],
"script": "base64:BgIICAISBAoCCAEAAQFpAQRzd2FwAgZfdG9rZW4KX21pbkFtb3VudAQHX2Ftb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQEFWZyb21Bc3NldEluZm9EZWNpbWFscwMJAQlpc0RlZmluZWQBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQICQEFdmFsdWUBCQDsBwEJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAhkZWNpbWFscwAIBBN0b0Fzc2V0SW5mb0RlY2ltYWxzCAkBBXZhbHVlAQkA7AcBCQDZBAEFBl90b2tlbghkZWNpbWFscwQLZGVjaW1hbERpZmYJAGUCBRN0b0Fzc2V0SW5mb0RlY2ltYWxzBRVmcm9tQXNzZXRJbmZvRGVjaW1hbHMEDHJlc3VsdEFtb3VudAMJAAACBQtkZWNpbWFsRGlmZgACCQBoAgUHX2Ftb3VudABkAwkAAAIFC2RlY2ltYWxEaWZmAP7//////////wEJAGkCBQdfYW1vdW50AGQDCQAAAgULZGVjaW1hbERpZmYAAAUHX2Ftb3VudAkAAgECFEludmFsaWQgZGVjaW1hbCBkaWZmCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUMcmVzdWx0QW1vdW50CQDZBAEFBl90b2tlbgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleR73+aY=",
"height": 2596692,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: none
Next: none
Full:
Old | New | | Differences |
---|
1 | | - | # no script |
---|
| 1 | + | {-# STDLIB_VERSION 6 #-} |
---|
| 2 | + | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
| 3 | + | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | |
---|
| 5 | + | |
---|
| 6 | + | @Callable(a) |
---|
| 7 | + | func swap (b,c) = { |
---|
| 8 | + | let d = a.payments[0].amount |
---|
| 9 | + | let e = if (isDefined(a.payments[0].assetId)) |
---|
| 10 | + | then value(assetInfo(value(a.payments[0].assetId))).decimals |
---|
| 11 | + | else 8 |
---|
| 12 | + | let f = value(assetInfo(fromBase58String(b))).decimals |
---|
| 13 | + | let g = (f - e) |
---|
| 14 | + | let h = if ((g == 2)) |
---|
| 15 | + | then (d * 100) |
---|
| 16 | + | else if ((g == -2)) |
---|
| 17 | + | then (d / 100) |
---|
| 18 | + | else if ((g == 0)) |
---|
| 19 | + | then d |
---|
| 20 | + | else throw("Invalid decimal diff") |
---|
| 21 | + | [ScriptTransfer(a.caller, h, fromBase58String(b))] |
---|
| 22 | + | } |
---|
| 23 | + | |
---|
| 24 | + | |
---|
| 25 | + | @Verifier(i) |
---|
| 26 | + | func j () = sigVerify(i.bodyBytes, i.proofs[0], i.senderPublicKey) |
---|
| 27 | + | |
---|