tx · AiFtJz8Re9jV4onBHE5vma8cWUAwgfG4xWTZmW3DHKP 3N2sti8sAvV7haGoDhq7hJZP2izFXqjJbLd: -0.01000000 Waves 2023.06.07 12:07 [2612046] smart account 3N2sti8sAvV7haGoDhq7hJZP2izFXqjJbLd > SELF 0.00000000 Waves
{ "type": 13, "id": "AiFtJz8Re9jV4onBHE5vma8cWUAwgfG4xWTZmW3DHKP", "fee": 1000000, "feeAssetId": null, "timestamp": 1686129070510, "version": 2, "chainId": 84, "sender": "3N2sti8sAvV7haGoDhq7hJZP2izFXqjJbLd", "senderPublicKey": "H6AD1jFLBQhAMmEhb7sYbpjG7DXeqFw3BxfJXkUGhac5", "proofs": [ "2N5SRdZUjwpbdxbAsX7x12hSRpTXqN91gw5zGQE3S1NWQr4Mhya59K5HCtsqJQ34eyht3wRW5zuUXWrgkZoNdGff" ], "script": "base64:BgIHCAISAwoBCAIABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgAFV0FWRVMBAAEBaQENYXNpbWlUcmFuc2ZlcgENcmVjZXBpZW50QWRkcgQGY2FsbGVyCAgFAWkGY2FsbGVyBWJ5dGVzBAdyZWNpdmVyCQDZBAEFDXJlY2VwaWVudEFkZHIEBmFtb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQEDXNlbmRlckJhbGFuY2UJAPAHAggFAWkGY2FsbGVyASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgMJAGYCBQZhbW91bnQFDXNlbmRlckJhbGFuY2UJAAIBAhtzb3JyeSF5b3UgaGF2ZSBsZXNzIGJhbGFuY2UDCQAAAggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQV0ZWFtcwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEFB3JlY2l2ZXIFBmFtb3VudAUFdGVhbXMJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkA2AQBBQZjYWxsZXICCV90cmFuc2ZlcgUGYW1vdW50CQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkA2AQBBQZjYWxsZXICDF90cmFuc2Zlcl90bwUNcmVjZXBpZW50QWRkcgUDbmlsBQNuaWwApFniMw==", "height": 2612046, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5oPxT4McgmavbAGNGDBygzw9qq8V8KLgEcVpJb8Equ3m Next: EiAApzGn8MgiLCw3KEAuUs9U8CCPFG7rpt3rREzxE9mW Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
4 | 5 | ||
6 | + | let WAVES = base58'' | |
5 | 7 | ||
6 | 8 | @Callable(i) | |
7 | - | func | |
8 | - | let | |
9 | - | let | |
10 | - | | |
11 | - | | |
12 | - | | |
13 | - | ||
14 | - | ||
15 | - | then [ScriptTransfer( | |
9 | + | func asimiTransfer (recepientAddr) = { | |
10 | + | let caller = i.caller.bytes | |
11 | + | let reciver = fromBase58String(recepientAddr) | |
12 | + | let amount = i.payments[0].amount | |
13 | + | let senderBalance = assetBalance(i.caller, base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq') | |
14 | + | if ((amount > senderBalance)) | |
15 | + | then throw("sorry!you have less balance") | |
16 | + | else if ((i.payments[0].assetId == teams)) | |
17 | + | then [ScriptTransfer(Address(reciver), amount, teams), IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr)] | |
16 | 18 | else nil | |
17 | 19 | } | |
18 | 20 | ||
19 | - | ||
20 | - | @Verifier(tx) | |
21 | - | func verify () = match tx { | |
22 | - | case setScriptTx: SetScriptTransaction => | |
23 | - | true | |
24 | - | case _ => | |
25 | - | false | |
26 | - | } | |
27 | 21 |
github/deemru/w8io/169f3d6 45.32 ms ◑