tx · FaNMkWeVzAskzZKACwB6iXYqvharbCJay8kvNsqVbnkg

3MwCoAS5bvfAqbHYxLYWEw3brqeo6SeoB7B:  -0.01400000 Waves

2022.04.11 16:00 [2003964] smart account 3MwCoAS5bvfAqbHYxLYWEw3brqeo6SeoB7B > SELF 0.00000000 Waves

{ "type": 13, "id": "FaNMkWeVzAskzZKACwB6iXYqvharbCJay8kvNsqVbnkg", "fee": 1400000, "feeAssetId": null, "timestamp": 1649682059259, "version": 1, "sender": "3MwCoAS5bvfAqbHYxLYWEw3brqeo6SeoB7B", "senderPublicKey": "5WJHJ8krgJY8GZvHds2k2fCTXmaYgW3NCnj2ifYZEhVV", "proofs": [ "27V9M73mNfiG3399Cn1Kyq5UaWtUMJBsUoHVZmJWhj7bhovBo2th7UngEXx4Vc4mj66nRqWsX9yeQxq7pei5gc2g" ], "script": "base64:AAIFAAAAAAAAAAkIAhIDCgEIEgAAAAAFAQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAIAAAAUJXNfX21hbmFnZXJQdWJsaWNLZXkBAAAAGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAAAAAIAAAAbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5AQAAABZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAAAAAQAAAAHJG1hdGNoMAkABCIAAAABCQEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAkAAlkAAAABBQAAAAFzAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAARVbml0BQAAAAR1bml0CQAAAgAAAAECAAAAC01hdGNoIGVycm9yAQAAAB1wZW5kaW5nTWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAAEAAAAByRtYXRjaDAJAAQiAAAAAQkBAAAAGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAAAAAMJAAABAAAAAgUAAAAHJG1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AAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA90YXJnZXRQdWJsaWNLZXmq8YBh", "chainId": 84, "height": 2003964, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FByajLwuZZed7QksQzHzogJvrqGg3SzHDTkKwdaMb5yW Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func keyManagerPublicKey () = "%s__managerPublicKey"
55
66
77 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
88
99
1010 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
1111 case s: String =>
1212 fromBase58String(s)
1313 case _: Unit =>
1414 unit
1515 case _ =>
1616 throw("Match error")
1717 }
1818
1919
2020 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
2121 case s: String =>
2222 fromBase58String(s)
2323 case _: Unit =>
2424 unit
2525 case _ =>
2626 throw("Match error")
2727 }
2828
2929
3030 func mustManager (i) = {
3131 let pd = throw("Permission denied")
3232 match managerPublicKeyOrUnit() {
3333 case pk: ByteVector =>
3434 if ((i.callerPublicKey == pk))
3535 then true
3636 else pd
3737 case _: Unit =>
3838 if ((i.caller == this))
3939 then true
4040 else pd
4141 case _ =>
4242 throw("Match error")
4343 }
4444 }
4545
4646
4747 @Callable(i)
4848 func setManager (pendingManagerPublicKey) = {
4949 let checkCaller = mustManager(i)
5050 if ((checkCaller == checkCaller))
5151 then {
5252 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
5353 if ((checkManagerPublicKey == checkManagerPublicKey))
5454 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
5555 else throw("Strict value is not equal to itself.")
5656 }
5757 else throw("Strict value is not equal to itself.")
5858 }
5959
6060
6161
6262 @Callable(i)
6363 func confirmManager () = {
6464 let pm = pendingManagerPublicKeyOrUnit()
6565 let hasPM = if (isDefined(pm))
6666 then true
6767 else throw("No pending manager")
6868 if ((hasPM == hasPM))
6969 then {
7070 let checkPM = if ((i.callerPublicKey == value(pm)))
7171 then true
7272 else throw("You are not pending manager")
7373 if ((checkPM == checkPM))
7474 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
7575 else throw("Strict value is not equal to itself.")
7676 }
7777 else throw("Strict value is not equal to itself.")
7878 }
7979
8080
8181 @Verifier(tx)
8282 func verify () = {
8383 let targetPublicKey = match managerPublicKeyOrUnit() {
8484 case pk: ByteVector =>
8585 pk
8686 case _: Unit =>
8787 tx.senderPublicKey
8888 case _ =>
8989 throw("Match error")
9090 }
9191 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
9292 }
9393

github/deemru/w8io/026f985 
25.80 ms