tx · CadguC9YBFgqWqkyTnXgW54pcJwVhrrGSo3ABFsG5nV7

3N8wRE9tq89N5SobanYnQjkt3B4FV4Xrwyg:  -0.00200000 Waves

2025.03.20 10:26 [3552075] smart account 3N8wRE9tq89N5SobanYnQjkt3B4FV4Xrwyg > SELF 0.00000000 Waves

{ "type": 13, "id": "CadguC9YBFgqWqkyTnXgW54pcJwVhrrGSo3ABFsG5nV7", "fee": 200000, "feeAssetId": null, "timestamp": 1742455609438, "version": 1, "sender": "3N8wRE9tq89N5SobanYnQjkt3B4FV4Xrwyg", "senderPublicKey": "9d3TkbCQgSgxHhod7UjRN4uuNmKaBp8jz2zJ6DaYPh5Q", "proofs": [ "2m663Y7HV7ZySp9SWaqYXYDkZhT3vcAtNNcBkazaQX1fGkmWot8SzQAmbz2yxF2vRPmf43rPrqJRbZ3Mxr8MFCid" ], "script": "base64:BwILCAISBwoFCAgIAQELAANTRVACAl9fAAt3YXZlc1N0cmluZwIFV0FWRVMAEGNvbnRyYWN0RmlsZW5hbWUCE3RyYW5zZmVyLXByb3h5LnJpZGUBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBB2tleVR4SWQBCnRyYW5zZmVySWQJALkJAgkAzAgCAgQlcyVzCQDMCAICAnR4CQDMCAIFCnRyYW5zZmVySWQFA25pbAUDU0VQAQprZXlJbnZvaWNlAQp0cmFuc2ZlcklkCQC5CQIJAMwIAgIEJXMlcwkAzAgCAgdpbnZvaWNlCQDMCAIFCnRyYW5zZmVySWQFA25pbAUDU0VQAQl0eElkVmFsdWUBBHR4SWQJALkJAgkAzAgCAgIlcwkAzAgCBQR0eElkBQNuaWwFA1NFUAEMaW52b2ljZVZhbHVlBAVhc3NldAZhbW91bnQFcHJpY2UJdGltZXN0YW1wBAxhbW91bnRTdHJpbmcJAKQDAQUGYW1vdW50BAtwcmljZVN0cmluZwkApAMBB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QJAQxpbnZvaWNlVmFsdWUEBQVhc3NldAUGYW1vdW50BQVwcmljZQgFBWJsb2NrCXRpbWVzdGFtcAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAKXcaA4=", "chainId": 84, "height": 3552075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HfiTjrVGRkGE8zY7SYCwr57oyRWD6tjRhgGXt6oLSb8B Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 7 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
6+let wavesString = "WAVES"
7+
8+let contractFilename = "transfer-proxy.ride"
9+
10+func wrapErr (s) = ((contractFilename + ": ") + s)
11+
12+
13+func throwErr (s) = throw(wrapErr(s))
14+
15+
16+func keyTxId (transferId) = makeString(["%s%s", "tx", transferId], SEP)
17+
18+
19+func keyInvoice (transferId) = makeString(["%s%s", "invoice", transferId], SEP)
20+
21+
22+func txIdValue (txId) = makeString(["%s", txId], SEP)
23+
24+
25+func invoiceValue (asset,amount,price,timestamp) = {
26+ let amountString = toString(amount)
27+ let priceString = toString(price)
28+ let timestampString = toString(timestamp)
29+ makeString(["%s%d%d%d", asset, amountString, priceString, timestampString], SEP)
30+ }
31+
32+
33+func parseAssetId (input) = if ((input == wavesString))
34+ then unit
35+ else fromBase58String(input)
36+
37+
38+func assetIdToString (input) = if ((input == unit))
39+ then wavesString
40+ else toBase58String(value(input))
41+
42+
43+@Callable(i)
44+func transfer (transfer_id,recipient,asset,amount,price) = {
45+ let checks = [if (!(isDefined(getString(keyTxId(transfer_id)))))
46+ then true
47+ else throwErr("transfer_id is already used")]
48+ if ((checks == checks))
49+ then {
50+ let block = valueOrErrorMessage(blockInfoByHeight(height), wrapErr("could not get block info"))
51+ let recipientAddress = addressFromStringValue(recipient)
52+[ScriptTransfer(recipientAddress, amount, parseAssetId(asset)), StringEntry(keyTxId(transfer_id), txIdValue(toBase58String(i.transactionId))), StringEntry(keyInvoice(transfer_id), invoiceValue(asset, amount, price, block.timestamp))]
53+ }
54+ else throw("Strict value is not equal to itself.")
55+ }
56+
57+

github/deemru/w8io/169f3d6 
16.78 ms