tx · 2pn16FJStX18qJk9Mc3W6LfLaCfkC49sbWqyDTAkECxz

3N4NKE4f4e5QtYYhKTLUDhfFvrpRpFJ85BP:  -0.05000000 Waves

2023.07.12 15:24 [2662676] smart account 3N4NKE4f4e5QtYYhKTLUDhfFvrpRpFJ85BP > SELF 0.00000000 Waves

{ "type": 13, "id": "2pn16FJStX18qJk9Mc3W6LfLaCfkC49sbWqyDTAkECxz", "fee": 5000000, "feeAssetId": null, "timestamp": 1689164703778, "version": 2, "chainId": 84, "sender": "3N4NKE4f4e5QtYYhKTLUDhfFvrpRpFJ85BP", "senderPublicKey": "9HUX7X3fYguR1KmnXCgaes2VgurXPZLQNmvkHo5LRwfa", "proofs": [ "5jw2qHqChxEf8AAjSSJYobazmQDyNs7iuGPiUg8EwxceJP6cpMH5SaTcu7XVUeumXUgBEdNxJHchPhob1LySg4Mo" ], "script": "base64:BgJhCAISAwoBCBIFCgMBCAgiDGtleVN3YXBBc3NldCIPZ2V0U3dhcEFzc2V0U3RyIgFpIglfYXNzZXRTdHIiB19hbW91bnQiCF9hZGRyZXNzIgNwbXQiDGFtb3VudFRvU2VuZAIBAWEACQC5CQIJAMwIAgICJXMJAMwIAgIJc3dhcEFzc2V0BQNuaWwCAl9fAQFiAAkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCiCAEJAQFhAAISU3dhcCBhc3NldCBub3Qgc2V0AgFjAQppbml0aWFsaXplAQFkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQFhAAUBZAUDbmlsAWMBBHN3YXADAWUBZAFmBAFnCQCRAwIIBQFjCHBheW1lbnRzAAAEAWgIBQFnBmFtb3VudAkAlAoCCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEFAWYFAWgJANkEAQkBAWIABQNuaWwFAWgAlP7mqg==", "height": 2662676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func keySwapAsset () = makeString(["%s", "swapAsset"], "__")
5+
6+
7+func getSwapAssetStr () = valueOrErrorMessage(getString(keySwapAsset()), "Swap asset not set")
8+
9+
10+@Callable(i)
11+func initialize (_assetStr) = [StringEntry(keySwapAsset(), _assetStr)]
12+
13+
14+
15+@Callable(i)
16+func swap (_amount,_assetStr,_address) = {
17+ let pmt = i.payments[0]
18+ let amountToSend = pmt.amount
19+ $Tuple2([ScriptTransfer(addressFromStringValue(_address), amountToSend, fromBase58String(getSwapAssetStr()))], amountToSend)
20+ }
21+
22+

github/deemru/w8io/026f985 
11.13 ms