tx · A1v67fJVQDqhb3T8tFqQ3xXQZ9j7iZh8z7CtU9NMhCM5
3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP: -0.01400000 Waves
2019.12.14 22:34 [808963] smart account 3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP > SELF 0.00000000 Waves
{
"type": 13,
"id": "A1v67fJVQDqhb3T8tFqQ3xXQZ9j7iZh8z7CtU9NMhCM5",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1576352129260,
"version": 1,
"sender": "3MyXEmrjz8G5z2Q8xiyBnucF9LUyggiChiP",
"senderPublicKey": "GRSgAjHJFmqVyE1sdnUmweBHV962Q1MyURh4frCUS1My",
"proofs": [
"4nWE3tHpeo9orR1vMAGCBd8z9jKvPqvrontd8icjvSYB4uKXZtDfdnGP5pouLV3ndegigw1twyN1agwHyeJJj4h9"
],
"script": "base64:AAIDAAAAAAAAAAwIARIICgYICAgICAgAAAAAAAAAAQAAAAFpAQAAAAphZGREZXBvc2l0AAAABgAAAARoYXNoAAAAB2FjY291bnQAAAAGYW1vdW50AAAAA3NlcQAAAAlnZW5lcmF0b3IAAAAJc2lnbmF0dXJlBAAAAAdtZXNzYWdlCQABmwAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABGhhc2gCAAAAASwFAAAAB2FjY291bnQCAAAAASwFAAAABmFtb3VudAIAAAABLAUAAAADc2VxBAAAABFtZXNzYWdlV2l0aFByZWZpeAkAAfUAAAABCQAAywAAAAIJAADLAAAAAgEAAAABGQkAAZsAAAABCQABLAAAAAICAAAAGUV0aGVyZXVtIFNpZ25lZCBNZXNzYWdlOgoJAAGkAAAAAQkAAMgAAAABBQAAAAdtZXNzYWdlBQAAAAdtZXNzYWdlAwkBAAAAASEAAAABCQAB9AAAAAMFAAAAEW1lc3NhZ2VXaXRoUHJlZml4CQACXQAAAAEFAAAACXNpZ25hdHVyZQkAAl0AAAABBQAAAAlnZW5lcmF0b3IJAAACAAAAAQkAAlwAAAABBQAAABFtZXNzYWdlV2l0aFByZWZpeAQAAAAOY2FsY3VsYXRlZEhhc2gJAAH1AAAAAQkAAMsAAAACCQAAywAAAAIJAAJdAAAAAQUAAAAHYWNjb3VudAkAAl0AAAABBQAAAAZhbW91bnQJAAJdAAAAAQUAAAADc2VxAwkBAAAAAiE9AAAAAgUAAAAOY2FsY3VsYXRlZEhhc2gJAAJdAAAAAQUAAAAEaGFzaAkAAAIAAAABAgAAAA1oYXNoIG1pc21hdGNoCQEAAAAIV3JpdGVTZXQAAAABBQAAAANuaWwAAAAACazIrA==",
"chainId": 84,
"height": 808963,
"spentComplexity": 0
}
View: original | compacted
Prev: 67TbWEaU4iYThF98rBahJBJtPerCVRQkHt1LCtfWhH8F
Next: 9eUZd37pGtEtpsjSrAaoCmiT7ZHXGq2QfM9QsMP9K9om
Diff:
Old | New | | Differences |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func addDeposit (hash,account,amount,seq,generator,signature) = { |
---|
8 | 8 | | let message = toBytes(((((((hash + ",") + account) + ",") + amount) + ",") + seq)) |
---|
9 | | - | let messageHash = keccak256(message) |
---|
10 | | - | let messageHashWithPrefix = keccak256(((base58'S' + toBytes("Ethereum Signed Message: |
---|
11 | | - | 32")) + messageHash)) |
---|
12 | | - | if (!(sigVerify(messageHashWithPrefix, fromBase16String(signature), fromBase16String(generator)))) |
---|
13 | | - | then throw(toBase16String(messageHashWithPrefix)) |
---|
| 9 | + | let messageWithPrefix = keccak256(((base58'S' + toBytes(("Ethereum Signed Message: |
---|
| 10 | + | " + toString(size(message))))) + message)) |
---|
| 11 | + | if (!(sigVerify(messageWithPrefix, fromBase16String(signature), fromBase16String(generator)))) |
---|
| 12 | + | then throw(toBase16String(messageWithPrefix)) |
---|
14 | 13 | | else { |
---|
15 | 14 | | let calculatedHash = keccak256(((fromBase16String(account) + fromBase16String(amount)) + fromBase16String(seq))) |
---|
16 | 15 | | 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 = toBytes(((((((hash + ",") + account) + ",") + amount) + ",") + seq)) |
---|
9 | | - | let messageHash = keccak256(message) |
---|
10 | | - | let messageHashWithPrefix = keccak256(((base58'S' + toBytes("Ethereum Signed Message: |
---|
11 | | - | 32")) + messageHash)) |
---|
12 | | - | if (!(sigVerify(messageHashWithPrefix, fromBase16String(signature), fromBase16String(generator)))) |
---|
13 | | - | then throw(toBase16String(messageHashWithPrefix)) |
---|
| 9 | + | let messageWithPrefix = keccak256(((base58'S' + toBytes(("Ethereum Signed Message: |
---|
| 10 | + | " + toString(size(message))))) + message)) |
---|
| 11 | + | if (!(sigVerify(messageWithPrefix, fromBase16String(signature), fromBase16String(generator)))) |
---|
| 12 | + | then throw(toBase16String(messageWithPrefix)) |
---|
14 | 13 | | else { |
---|
15 | 14 | | let calculatedHash = keccak256(((fromBase16String(account) + fromBase16String(amount)) + fromBase16String(seq))) |
---|
16 | 15 | | if ((calculatedHash != fromBase16String(hash))) |
---|
17 | 16 | | then throw("hash mismatch") |
---|
18 | 17 | | else WriteSet(nil) |
---|
19 | 18 | | } |
---|
20 | 19 | | } |
---|
21 | 20 | | |
---|
22 | 21 | | |
---|