tx · GvjyCG9GAAvgDi3WnkisEeDSkXH1pK5UpiJ7TbeYTc5S
3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP: -0.01400000 Waves
2019.12.14 21:22 [808896] smart account 3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP > SELF 0.00000000 Waves
{
"type": 13,
"id": "GvjyCG9GAAvgDi3WnkisEeDSkXH1pK5UpiJ7TbeYTc5S",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1576347712758,
"version": 1,
"sender": "3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP",
"senderPublicKey": "GRSgAjHJFmqVyE1sdnUmweBHV962Q1MyURh4frCUS1My",
"proofs": [
"2uF3VEFHu52Uf3HR7BBSFrE25LvvRhxLMzyoQZEeNbcM7F55fxvEP1E79ocTZv44HxeQdnvZQ5kXpaXvhBA3bmKz"
],
"script": "base64:AAIDAAAAAAAAAAwIARIICgYICAgICAgAAAAAAAAAAQAAAAFpAQAAAAphZGREZXBvc2l0AAAABgAAAARoYXNoAAAAB2FjY291bnQAAAAGYW1vdW50AAAAA3NlcQAAAAlnZW5lcmF0b3IAAAAJc2lnbmF0dXJlBAAAAAdtZXNzYWdlCQAAywAAAAIJAADLAAAAAgkAAMsAAAACAQAAAAEZCQABmwAAAAECAAAAGUV0aGVyZXVtIFNpZ25lZCBNZXNzYWdlOgoBAAAAAesJAAGbAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEaGFzaAIAAAABLAUAAAAHYWNjb3VudAIAAAABLAUAAAAGYW1vdW50AgAAAAEsBQAAAANzZXEDCQEAAAABIQAAAAEJAAH0AAAAAwUAAAAHbWVzc2FnZQkAAl0AAAABBQAAAAlzaWduYXR1cmUJAAJdAAAAAQUAAAAJZ2VuZXJhdG9yCQAAAgAAAAEJAAJcAAAAAQkAAfUAAAABBQAAAAdtZXNzYWdlBAAAAA5jYWxjdWxhdGVkSGFzaAkAAfUAAAABCQAAywAAAAIJAADLAAAAAgkAAl0AAAABBQAAAAdhY2NvdW50CQACXQAAAAEFAAAABmFtb3VudAkAAl0AAAABBQAAAANzZXEDCQEAAAACIT0AAAACBQAAAA5jYWxjdWxhdGVkSGFzaAkAAl0AAAABBQAAAARoYXNoCQAAAgAAAAECAAAADWhhc2ggbWlzbWF0Y2gJAQAAAAhXcml0ZVNldAAAAAEFAAAAA25pbAAAAACXqcEK",
"chainId": 84,
"height": 808896,
"spentComplexity": 0
}
View: original | compacted
Prev: Cza4Wkp7SKG4mXVfDEP92oXGPL22NfgenHgUAUE45enW
Next: CBXk7chM64s11JacJwcbczjei4mrK9WuWVfRmseRtbJv
Diff:
Old | New | | Differences |
---|
8 | 8 | | let message = (((base58'S' + toBytes("Ethereum Signed Message: |
---|
9 | 9 | | ")) + base58'54') + toBytes(((((((hash + ",") + account) + ",") + amount) + ",") + seq))) |
---|
10 | 10 | | if (!(sigVerify(message, fromBase16String(signature), fromBase16String(generator)))) |
---|
11 | | - | then throw(("invalid signature" + toUtf8String(message))) |
---|
| 11 | + | then throw(toBase16String(keccak256(message))) |
---|
12 | 12 | | else { |
---|
13 | 13 | | let calculatedHash = keccak256(((fromBase16String(account) + fromBase16String(amount)) + fromBase16String(seq))) |
---|
14 | 14 | | if ((calculatedHash != fromBase16String(hash))) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func addDeposit (hash,account,amount,seq,generator,signature) = { |
---|
8 | 8 | | let message = (((base58'S' + toBytes("Ethereum Signed Message: |
---|
9 | 9 | | ")) + base58'54') + toBytes(((((((hash + ",") + account) + ",") + amount) + ",") + seq))) |
---|
10 | 10 | | if (!(sigVerify(message, fromBase16String(signature), fromBase16String(generator)))) |
---|
11 | | - | then throw(("invalid signature" + toUtf8String(message))) |
---|
| 11 | + | then throw(toBase16String(keccak256(message))) |
---|
12 | 12 | | else { |
---|
13 | 13 | | let calculatedHash = keccak256(((fromBase16String(account) + fromBase16String(amount)) + fromBase16String(seq))) |
---|
14 | 14 | | if ((calculatedHash != fromBase16String(hash))) |
---|
15 | 15 | | then throw("hash mismatch") |
---|
16 | 16 | | else WriteSet(nil) |
---|
17 | 17 | | } |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|