tx · 8Z9PJAKd7xqqfsSc4EsUa76Q2oUJsvZq1DUvqmkVPWJX

3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E:  -0.01400000 Waves

2020.11.26 10:09 [1282064] smart account 3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E > SELF 0.00000000 Waves

{ "type": 13, "id": "8Z9PJAKd7xqqfsSc4EsUa76Q2oUJsvZq1DUvqmkVPWJX", "fee": 1400000, "feeAssetId": null, "timestamp": 1606374591942, "version": 2, "chainId": 84, "sender": "3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E", "senderPublicKey": "FJk5n9i5ysYBtjvPcos6iKm98yzpxms3gECZgg6Y8Bt1", "proofs": [ "5PZpr8NehERnUMTTkL2gFfMo23A3Z1ckJiPVimXgQLRV1tdpzqCwkvtQurmeDW1i3F79wD8wdCHjZXmSqREcFDiA" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAFZGVsYXkAAAAAAAAAAAoAAAAADGFtb3VudFRvR2l2ZQAAAAACVAvkAAAAAAAHYXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresBAAAAD2dldEludGVnZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhCQAAZQAAAAIFAAAABmhlaWdodAUAAAAFZGVsYXkAAAABAAAAAWkBAAAAB2dldFNpZ24AAAABAAAABGFkZHIEAAAABmNhbGxlcgkABCUAAAABCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAADmxhc3RDYWxsSGVpZ2h0CQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQUAAAAGY2FsbGVyBAAAAAZjYW5HZXQJAABnAAAAAgkAAGUAAAACBQAAAAZoZWlnaHQFAAAADmxhc3RDYWxsSGVpZ2h0BQAAAAVkZWxheQMFAAAABmNhbkdldAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAGY2FsbGVyBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAABGFkZHIFAAAADGFtb3VudFRvR2l2ZQUAAAAHYXNzZXRJZAUAAAADbmlsCQAAAgAAAAECAAAAI1lvdSBjYW5ub3QgZ2V0IFNJR04gVG9rZW4gYWdhaW4geWV0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAANpbnYFAAAAByRtYXRjaDAEAAAADmxhc3RDYWxsSGVpZ2h0CQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQkABCUAAAABCAUAAAADaW52AAAABnNlbmRlcgQAAAAGY2FuR2V0CQAAZwAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAA5sYXN0Q2FsbEhlaWdodAUAAAAFZGVsYXkDBQAAAAZjYW5HZXQJAAAAAAAAAggFAAAAA2ludgAAAAhmdW5jdGlvbgIAAAAHZ2V0U2lnbgcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzc3QFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B9a9/ck=", "height": 1282064, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BSkWiwpUPHGqbF6usXEjTGmpJnretC489h7qTqPXirzt Next: 3J9iZuMWEC29XeQoFKUEkTHvgrRn4xYfsaDif17yAHqX Diff:
OldNewDifferences
1616
1717
1818 @Callable(i)
19-func getSign () = {
19+func getSign (addr) = {
2020 let caller = toString(addressFromPublicKey(i.callerPublicKey))
2121 let lastCallHeight = getIntegerByKey(caller)
2222 let canGet = ((height - lastCallHeight) >= delay)
2323 if (canGet)
24- then [IntegerEntry(caller, height), ScriptTransfer(Address(fromBase58String(caller)), amountToGive, assetId)]
24+ then [IntegerEntry(caller, height), ScriptTransfer(Address(fromBase58String(addr)), amountToGive, assetId)]
2525 else throw("You cannot get SIGN Token again yet")
2626 }
2727
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let delay = 10
55
66 let amountToGive = 10000000000
77
88 let assetId = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a'
99
1010 func getIntegerByKey (key) = match getInteger(this, key) {
1111 case a: Int =>
1212 a
1313 case _ =>
1414 (height - delay)
1515 }
1616
1717
1818 @Callable(i)
19-func getSign () = {
19+func getSign (addr) = {
2020 let caller = toString(addressFromPublicKey(i.callerPublicKey))
2121 let lastCallHeight = getIntegerByKey(caller)
2222 let canGet = ((height - lastCallHeight) >= delay)
2323 if (canGet)
24- then [IntegerEntry(caller, height), ScriptTransfer(Address(fromBase58String(caller)), amountToGive, assetId)]
24+ then [IntegerEntry(caller, height), ScriptTransfer(Address(fromBase58String(addr)), amountToGive, assetId)]
2525 else throw("You cannot get SIGN Token again yet")
2626 }
2727
2828
2929 @Verifier(tx)
3030 func verify () = match tx {
3131 case inv: InvokeScriptTransaction =>
3232 let lastCallHeight = getIntegerByKey(toString(inv.sender))
3333 let canGet = ((height - lastCallHeight) >= delay)
3434 if (canGet)
3535 then (inv.function == "getSign")
3636 else false
3737 case sst: SetScriptTransaction =>
3838 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3939 case _ =>
4040 false
4141 }
4242

github/deemru/w8io/026f985 
21.19 ms