tx · DSojgty6i8h5DFaA3pDRqWbUC5qA4iH5ddWJeBeLmEkA 3MvasVWNoyFQTenxtVJkcLRfcPshL6RiHB6: -0.01400000 Waves 2022.01.10 16:56 [1872908] smart account 3MvasVWNoyFQTenxtVJkcLRfcPshL6RiHB6 > SELF 0.00000000 Waves
{ "type": 13, "id": "DSojgty6i8h5DFaA3pDRqWbUC5qA4iH5ddWJeBeLmEkA", "fee": 1400000, "feeAssetId": null, "timestamp": 1641822929801, "version": 2, "chainId": 84, "sender": "3MvasVWNoyFQTenxtVJkcLRfcPshL6RiHB6", "senderPublicKey": "HxtsXAKo7k2EM5vvWiqRJHGy6cSc8pxWDEpQJhVYJXsa", "proofs": [ "3uxESSs7G7Rqd1iLQZTRaqdKq9pWGo3VGduZn1izgLcqr55FeFdh11kzCpibAoKbG3fvDHyNdto9WRi49j7yUcva" ], "script": "base64:AAIEAAAAAAAAANwIAhoQCgFhEgthbGljZVB1YktleRoOCgFiEglib2JQdWJLZXkaDwoBYxIKZXJpY1B1YktleRoSCgFkEg1tdWx0aVNpZ0NvdW50Gg4KAWUSCWNoZWNrU2lnbhoHCgFmEgJ0eBoLCgFnEgZwdWJLZXkaFQoBaBIQZ2V0TXVsdGlTaWdWYWx1ZRoNCgFpEghhbGljZVNpZxoLCgFqEgZib2JTaWcaDAoBaxIHZXJpY1NpZxoLCgFsEgZ2ZXJpZnkaDAoBbRIHJG1hdGNoMBoGCgFuEgF0GgcKAW8SAnRkAAAABgAAAAABYQEAAAAg/AyWCccGbFQEbAH/hOzU/yaLPVbFrpTRou7V+5mu0kUAAAAAAWIBAAAAIPSxityAqF1o8NbAdYX5XBEpUlDy+lbYSuxhjio4jvETAAAAAAFjAQAAACByZp1UTTKFFX9H3nd0f2yNR2rdOVfV/zkMtuOrYVWONQAAAAABZAAAAAAAAAAAAgEAAAABZQAAAAIAAAABZgAAAAFnAwMDCQAB9AAAAAMIBQAAAAFmAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABZgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAWcGCQAB9AAAAAMIBQAAAAFmAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABZgAAAAZwcm9vZnMAAAAAAAAAAAEFAAAAAWcGCQAB9AAAAAMIBQAAAAFmAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABZgAAAAZwcm9vZnMAAAAAAAAAAAIFAAAAAWcAAAAAAAAAAAEAAAAAAAAAAAABAAAAAWgAAAABAAAAAWYEAAAAAWkJAQAAAAFlAAAAAgUAAAABZgUAAAABYQQAAAABagkBAAAAAWUAAAACBQAAAAFmBQAAAAFiBAAAAAFrCQEAAAABZQAAAAIFAAAAAWYFAAAAAWMJAABkAAAAAgkAAGQAAAACBQAAAAFpBQAAAAFqBQAAAAFrAAAAAAAAAAEAAAABZgEAAAABbAAAAAAEAAAAAW0FAAAAAWYDCQAAAQAAAAIFAAAAAW0CAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFuBQAAAAFtCQAB9AAAAAMIBQAAAAFuAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABbgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAWEDCQAAAQAAAAIFAAAAAW0CAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAW8FAAAAAW0JAABnAAAAAgkBAAAAAWgAAAABBQAAAAFvBQAAAAFkBx7cqvw=", "height": 1872908, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GJGbtjH6hRHAfvQdxb2Ug1wHxhQeYwHGSaQVB4ZXDRKK Next: 7P9hpirfMJZzsBuMnFCQ1x1Deg1aReUTfz8tDWoGiNgq Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let ericPubKey = base58'8haEN2a7ZmkzawLmnr5rFX14X1oHi5kjt8NQUDNjSDLG' | |
9 | 9 | ||
10 | - | let multiSigCount = | |
10 | + | let multiSigCount = 2 | |
11 | 11 | ||
12 | 12 | func checkSign (tx,pubKey) = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKey)) | |
13 | 13 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let alicePubKey = base58'HxtsXAKo7k2EM5vvWiqRJHGy6cSc8pxWDEpQJhVYJXsa' | |
5 | 5 | ||
6 | 6 | let bobPubKey = base58'HUBVsBcuExqVSbV3mSVhpdKfgihF2nwdtpGmpVLRwxEN' | |
7 | 7 | ||
8 | 8 | let ericPubKey = base58'8haEN2a7ZmkzawLmnr5rFX14X1oHi5kjt8NQUDNjSDLG' | |
9 | 9 | ||
10 | - | let multiSigCount = | |
10 | + | let multiSigCount = 2 | |
11 | 11 | ||
12 | 12 | func checkSign (tx,pubKey) = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKey)) | |
13 | 13 | then true | |
14 | 14 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKey)) | |
15 | 15 | then true | |
16 | 16 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKey)) | |
17 | 17 | then 1 | |
18 | 18 | else 0 | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getMultiSigValue (tx) = { | |
22 | 22 | let aliceSig = checkSign(tx, alicePubKey) | |
23 | 23 | let bobSig = checkSign(tx, bobPubKey) | |
24 | 24 | let ericSig = checkSign(tx, ericPubKey) | |
25 | 25 | ((aliceSig + bobSig) + ericSig) | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Verifier(tx) | |
31 | 31 | func verify () = match tx { | |
32 | 32 | case t: SetScriptTransaction => | |
33 | 33 | sigVerify(t.bodyBytes, t.proofs[0], alicePubKey) | |
34 | 34 | case td: TransferTransaction => | |
35 | 35 | (getMultiSigValue(td) >= multiSigCount) | |
36 | 36 | case _ => | |
37 | 37 | false | |
38 | 38 | } | |
39 | 39 |
github/deemru/w8io/169f3d6 19.34 ms ◑