tx · GLLNGG9rSyG7fesMARvVaaUftH2XFJR3AsboDQyGtyxE

3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi:  -0.01400000 Waves

2019.12.16 15:31 [811452] smart account 3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi > SELF 0.00000000 Waves

{ "type": 13, "id": "GLLNGG9rSyG7fesMARvVaaUftH2XFJR3AsboDQyGtyxE", "fee": 1400000, "feeAssetId": null, "timestamp": 1576499532718, "version": 1, "sender": "3N4nuuU1RHiiGh5qukdEoPff81c5idJAYQi", "senderPublicKey": "FtFfC9tULuEf2b5WVZhS948Yxi3vRFCiuxLdyrkquPtj", "proofs": [ "4KKLC8XnXyRy5v9LbP9hf8ffdqdC6NRfYR7ek5Q4EpacuBSFQbx5UFo3jPAbL3STrwbhjs9LF2SbnNhjQijkQfBi" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAADAAAAAANZGVhbGVyQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVIIvZsveTY8YvUj9QbUNXQSwv3NN2tEbNAAAAAAQd2hpdGVsaXN0QWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVJDHIIUGzZ6WUTT7eDRBXvzmo+8NTa6YKgAAAAAUZEFwcFdoaXRlbGlzdEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTjb3DY4EpS1I3pGV9/Mjfqvvd5yJ9vYR8AAAAACXBBZGRyZXNzMQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM05DVkRhVDFBU2JSZDQyaEJTdzRFRzZvakdWUkd0dk1pejEAAAAACXBBZGRyZXNzMgkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM01zMmtUQXhkcmNYRHh3ZWRmYk5qU2k2ZXdHQ1VxdDNoZVoAAAAACXBBZGRyZXNzMwkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM042b2dubTd4blFT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R1cwAAAAAAAAAAAAkAAAIAAAABAgAAABlEZWFsZXIgZEFwcCBpcyBub3QgYWN0aXZlBAAAAAtjYWxsZXJDaGVjawkBAAAADGNoZWNrQWRkcmVzcwAAAAEJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAOcmVjaXBpZW50Q2hlY2sJAQAAAAxjaGVja0FkZHJlc3MAAAABBQAAAAl0b0FkZHJlc3MDAwUAAAALY2FsbGVyQ2hlY2sFAAAADnJlY2lwaWVudENoZWNrBwQAAAAHcGF5bWVudAkBAAAACmdldFBheW1lbnQAAAABBQAAAAFpCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAJdG9BZGRyZXNzCAUAAAAHcGF5bWVudAAAAAZhbW91bnQIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAACxUaGlzIGFjY291bnQgaGFzIG5vIHJpZ2h0IHRvIHNlbmQvZ2V0IGZ1bmRzLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB+DAML8=", "chainId": 84, "height": 811452, "spentComplexity": 0 } View: original | compacted Prev: Ci44FoWG48rxX61F5J7iWnA843EWU7nA19TYde6sXfy Next: none Diff:
OldNewDifferences
3636 case _ =>
3737 -255
3838 }
39- if ((validState > isAccountAllow))
40- then throw("This account has no right to send/get funds.")
41- else true
39+ (isAccountAllow == validState)
4240 }
4341
4442
5553 else {
5654 let callerCheck = checkAddress(toBase58String(i.caller.bytes))
5755 let recipientCheck = checkAddress(toAddress)
58- let payment = getPayment(i)
59- TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)])
56+ if (if (callerCheck)
57+ then recipientCheck
58+ else false)
59+ then {
60+ let payment = getPayment(i)
61+ TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)])
62+ }
63+ else throw("This account has no right to send/get funds.")
6064 }
6165 }
6266
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let dealerAddress = Address(base58'3N1nSQNkUmZtgmgsgYSg54cu25jLFWBUAcB')
55
66 let whitelistAddress = Address(base58'3N37bd8eggz2AFnEXFFgMMtfYQMgMvXLPaZ')
77
88 let dAppWhitelistAddress = Address(base58'3NAeefWVGWNzuSeVij5nJYZHkiimqQv8ysc')
99
1010 let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1")
1111
1212 let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ")
1313
1414 let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe")
1515
1616 let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC")
1717
1818 let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg")
1919
2020 let ver = "0.0.1-otc-testnet"
2121
2222 let validState = 1000
2323
2424 func getPayment (i) = match i.payment {
2525 case p: AttachedPayment =>
2626 p
2727 case _ =>
2828 throw("Payment must be attached")
2929 }
3030
3131
3232 func checkAddress (account) = {
3333 let isAccountAllow = match getInteger(whitelistAddress, account) {
3434 case a: Int =>
3535 a
3636 case _ =>
3737 -255
3838 }
39- if ((validState > isAccountAllow))
40- then throw("This account has no right to send/get funds.")
41- else true
39+ (isAccountAllow == validState)
4240 }
4341
4442
4543 @Callable(i)
4644 func transfer (toAddress) = {
4745 let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) {
4846 case a: Int =>
4947 a
5048 case _ =>
5149 0
5250 }
5351 if ((dAppStatus == 0))
5452 then throw("Dealer dApp is not active")
5553 else {
5654 let callerCheck = checkAddress(toBase58String(i.caller.bytes))
5755 let recipientCheck = checkAddress(toAddress)
58- let payment = getPayment(i)
59- TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)])
56+ if (if (callerCheck)
57+ then recipientCheck
58+ else false)
59+ then {
60+ let payment = getPayment(i)
61+ TransferSet([ScriptTransfer(addressFromStringValue(toAddress), payment.amount, payment.assetId)])
62+ }
63+ else throw("This account has no right to send/get funds.")
6064 }
6165 }
6266
6367
6468 @Verifier(tx)
6569 func verify () = match tx {
6670 case tx: SetScriptTransaction =>
6771 true
6872 case _ =>
6973 false
7074 }
7175

github/deemru/w8io/169f3d6 
40.95 ms