tx · G9s1UWtKRvZpv2H2KcB16kJbkeRZ2VQvMFUkxUU5txsp

3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN:  -0.01400000 Waves

2019.09.15 16:33 [677406] smart account 3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN > SELF 0.00000000 Waves

{ "type": 13, "id": "G9s1UWtKRvZpv2H2KcB16kJbkeRZ2VQvMFUkxUU5txsp", "fee": 1400000, "feeAssetId": null, "timestamp": 1568554417179, "version": 1, "sender": "3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN", "senderPublicKey": "6qNq3Wug6srPUuAQrggzvR3nvagzN3AzsR4fABCH1qMm", "proofs": [ "3VG7GKXCQehQaaTdxjnqoF6v5b1gVJ1bR4uJixb58sKscZPjedA8XTHNyZJu27VmVujezUhd3SDh2ZQf5uKfWrse" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAZjcmVhdGUAAAABAAAAAnBrBAAAAAdwYXltZW50CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIIBQAAAAFpAAAAB3BheW1lbnQCAAAAE1doZXJlIGlzIGEgcGF5bWVudD8DCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACRZb3UgY2FuIHVzZSBvbmx5IFdBVkVTIGF0IHRoZSBtb21lbnQEAAAACmNvZGVFeGlzdHMEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAJwawIAAAAFX3VzZWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWIFAAAAByRtYXRjaDAJAQAAAAEhAAAAAQUAAAABYgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAcJAQAAAAV0aHJvdwAAAAADBQAAAApjb2RlRXhpc3RzCQAAAgAAAAECAAAAD1RoZSBjb2RlIGV4aXN0c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hbGxlcgkAAGQAAAACBQAAAAZhbW91bnQIBQAAAAFpAAAAA2ZlZQUAAAAEdW5pdAUAAAADbmlsAAAAAD0kVE0=", "chainId": 84, "height": 677406, "spentComplexity": 0 } View: original | compacted Prev: 46eWTbMTm2nAfwZk3AAKb3wbtG6gJV6v9DhhDyKmGSEF Next: BGB7PLb3ER7WNHsrj4QHnZrEXMDBEhRgiZ24uW5HXizg Diff:
OldNewDifferences
3535 else (i.feeAssetId != unit))
3636 then throw("Fee must be less than or equal to 0.005 WAVES")
3737 else {
38- let valid = sigVerify(i.caller.bytes, fromBase58String(sig), fromBase58String(pk))
38+ let valid = sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(pk))
3939 let amount = getIntegerValue(this, (pk + "_amount"))
4040 ScriptResult(WriteSet([DataEntry((pk + "_used"), true)]), TransferSet([ScriptTransfer(i.caller, (amount + i.fee), unit)]))
4141 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func create (pk) = {
88 let payment = valueOrErrorMessage(i.payment, "Where is a payment?")
99 if (isDefined(payment.assetId))
1010 then throw("You can use only WAVES at the moment")
1111 else {
1212 let codeExists = match getBoolean(this, (pk + "_used")) {
1313 case b: Boolean =>
1414 !(b)
1515 case _: Unit =>
1616 false
1717 case _ =>
1818 throw()
1919 }
2020 if (codeExists)
2121 then throw("The code exists")
2222 else WriteSet([DataEntry((pk + "_amount"), payment.amount), DataEntry((pk + "_used"), false)])
2323 }
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func withdraw (pk,sig) = {
3030 let codeUsed = valueOrErrorMessage(getBoolean(this, (pk + "_used")), "The code doesn't exist")
3131 if (codeUsed)
3232 then throw("The code has already been used")
3333 else if (if ((i.fee > 500000))
3434 then true
3535 else (i.feeAssetId != unit))
3636 then throw("Fee must be less than or equal to 0.005 WAVES")
3737 else {
38- let valid = sigVerify(i.caller.bytes, fromBase58String(sig), fromBase58String(pk))
38+ let valid = sigVerify(i.callerPublicKey, fromBase58String(sig), fromBase58String(pk))
3939 let amount = getIntegerValue(this, (pk + "_amount"))
4040 ScriptResult(WriteSet([DataEntry((pk + "_used"), true)]), TransferSet([ScriptTransfer(i.caller, (amount + i.fee), unit)]))
4141 }
4242 }
4343
4444

github/deemru/w8io/026f985 
34.40 ms