tx · 6MVLChFtXfrDvSKFzXN1rumyVzq1xG6BAXw193QihaWS
3NC7GJvfMCykyTMSe9KU2rJmVygk1fzzKpC: -0.01000000 Waves
2020.04.10 12:04 [948043] smart account 3NC7GJvfMCykyTMSe9KU2rJmVygk1fzzKpC > SELF 0.00000000 Waves
{
"type": 13,
"id": "6MVLChFtXfrDvSKFzXN1rumyVzq1xG6BAXw193QihaWS",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1586509462446,
"version": 1,
"sender": "3NC7GJvfMCykyTMSe9KU2rJmVygk1fzzKpC",
"senderPublicKey": "BNrrKkZSXXCbcCtXLT3VMQnSAJt2jt8TLnZWaB5US3Ci",
"proofs": [
"53etxcE1yAgBD1FNRCd64ekr9nWhEDPdk4QgajYwTwrx5WxvNehCQbjFShB8dUKz6dNt9HWjCJVtZovSywvcr4Cc"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAgAAAAAEdXNkbgEAAAAgImQ/Hr5gRukRahMT3KYz/hZ+B/l36bPyFfyZSSowCjcBAAAACmdldEJhbGFuY2UAAAABAAAAB2FkZHJlc3MEAAAAAWIJAAQaAAAAAgUAAAAEdGhpcwUAAAAHYWRkcmVzcwQAAAAHJG1hdGNoMAUAAAABYgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAF0BQAAAAckbWF0Y2gwBQAAAAF0AAAAAAAAAAAAAAAAAQAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAAHYWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAANiYWwJAQAAAApnZXRCYWxhbmNlAAAAAQUAAAAHYWRkcmVzcwQAAAAHcGF5bWVudAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkAAAAAAAACCAUAAAAHcGF5bWVudAAAAAdhc3NldElkBQAAAAR1c2RuCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAHYWRkcmVzcwkAAGQAAAACBQAAAANiYWwIBQAAAAdwYXltZW50AAAABmFtb3VudAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAANuaWwJAAACAAAAAQIAAAAOU2hvdWxkIGJlIFVTRE4AAAAA+AdPtA==",
"chainId": 84,
"height": 948043,
"spentComplexity": 0
}
View: original | compacted
Prev: none
Next: 8SALX1ha7bkpGdEABvRuym5YaAmEnCKypqCV94DEYzer
Full:
Old | New | | Differences |
---|
1 | | - | # no script |
---|
| 1 | + | {-# STDLIB_VERSION 3 #-} |
---|
| 2 | + | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
| 3 | + | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | let usdn = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC' |
---|
| 5 | + | |
---|
| 6 | + | func getBalance (address) = { |
---|
| 7 | + | let b = getInteger(this, address) |
---|
| 8 | + | match b { |
---|
| 9 | + | case t: Int => |
---|
| 10 | + | t |
---|
| 11 | + | case _ => |
---|
| 12 | + | 0 |
---|
| 13 | + | } |
---|
| 14 | + | } |
---|
| 15 | + | |
---|
| 16 | + | |
---|
| 17 | + | @Callable(i) |
---|
| 18 | + | func deposit () = { |
---|
| 19 | + | let address = toBase58String(i.caller.bytes) |
---|
| 20 | + | let bal = getBalance(address) |
---|
| 21 | + | let payment = extract(i.payment) |
---|
| 22 | + | if ((payment.assetId == usdn)) |
---|
| 23 | + | then ScriptResult(WriteSet([DataEntry(address, (bal + payment.amount))]), TransferSet(nil)) |
---|
| 24 | + | else throw("Should be USDN") |
---|
| 25 | + | } |
---|
| 26 | + | |
---|
| 27 | + | |
---|