tx · FgRKmwBWbK5duirG2QVx6o4Ceb8SJon7QfXeKuGfDLKG

3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY:  -0.01000000 Waves

2022.11.14 16:03 [2316836] smart account 3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY > SELF 0.00000000 Waves

{ "type": 13, "id": "FgRKmwBWbK5duirG2QVx6o4Ceb8SJon7QfXeKuGfDLKG", "fee": 1000000, "feeAssetId": null, "timestamp": 1668431075293, "version": 2, "chainId": 84, "sender": "3N5ZhGLzDmoMwHsWKAoTqkFvVYuditKPyvY", "senderPublicKey": "7mgUaX6yf7mFk48Gus7kVGRUwCZXtr2CKWJW6KoukPiW", "proofs": [ "2gYaeCBeKbcNJTJCndnGhZSFMSSFokBQ6BZGK8Di7uE2TVtrRHpavyVbD33qXHuQ5u6aMzjgekhZ7R9zKqNpBdQT" ], "script": "base64:AAIFAAAAAAAAAA4IAhIAEgMKAQESAwoBAQAAAAEAAAAABnVzZG5JRAEAAAAgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAAAADAAAAAWkBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABmNhbGxlcgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABnVzZG5JRAkAAAIAAAABAgAAAA1JbnZhbGlkIGFzc2V0BAAAAAlkZXBvc2l0ZWQJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAAGY2FsbGVyAAAAAAAAAAAABAAAAAFzCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAGY2FsbGVyCQAAZAAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAlkZXBvc2l0ZWQEAAAAB29uU3Rha2UJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJA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ALZm9yV2l0aGRyYXcJAAACAAAAAQIAAAATTm90IGVub3VnaCB0byBjbGFpbQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAAZjYWxsZXICAAAACV93aXRoZHJhdwkAAGUAAAACBQAAAAtmb3JXaXRoZHJhdwUAAAAGYW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50BQAAAAZ1c2RuSUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5MC6gng==", "height": 2316836, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5K9e9dPw2NV47zr2VdqywautqEdcNbE78gJVyGQe8yCg Next: none Diff:
OldNewDifferences
1212 else {
1313 let deposited = valueOrElse(getInteger(this, caller), 0)
1414 let s = IntegerEntry(caller, (pmt.amount + deposited))
15- let onStake = valueOrElse(getInteger(this, "_tresury"), 0)
15+ let onStake = valueOrElse(getInteger(this, "_treasury"), 0)
1616 let updateTreasury = IntegerEntry("_treasury", (pmt.amount + onStake))
1717 [s, updateTreasury]
1818 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnID = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 @Callable(i)
77 func deposit () = {
88 let pmt = i.payments[0]
99 let caller = toString(i.caller)
1010 if ((pmt.assetId != usdnID))
1111 then throw("Invalid asset")
1212 else {
1313 let deposited = valueOrElse(getInteger(this, caller), 0)
1414 let s = IntegerEntry(caller, (pmt.amount + deposited))
15- let onStake = valueOrElse(getInteger(this, "_tresury"), 0)
15+ let onStake = valueOrElse(getInteger(this, "_treasury"), 0)
1616 let updateTreasury = IntegerEntry("_treasury", (pmt.amount + onStake))
1717 [s, updateTreasury]
1818 }
1919 }
2020
2121
2222
2323 @Callable(i)
2424 func withdraw (amount) = {
2525 let caller = toString(i.caller)
2626 let pmt = i.payments[0]
2727 let callerBalance = valueOrElse(getInteger(this, caller), 0)
2828 if ((callerBalance == 0))
2929 then throw("Nothing to withdraw")
3030 else if ((0 >= amount))
3131 then throw("Invalid input")
3232 else [IntegerEntry(caller, (callerBalance - pmt.amount)), ScriptTransfer(i.caller, pmt.amount, usdnID)]
3333 }
3434
3535
3636
3737 @Callable(i)
3838 func claim (amount) = {
3939 let caller = toString(i.caller)
4040 let forWithdraw = getIntegerValue(this, caller)
4141 if ((amount > forWithdraw))
4242 then throw("Not enough to claim")
4343 else [IntegerEntry((caller + "_withdraw"), (forWithdraw - amount)), ScriptTransfer(i.caller, amount, usdnID)]
4444 }
4545
4646
4747 @Verifier(tx)
4848 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4949

github/deemru/w8io/169f3d6 
30.91 ms