tx · 6FvHTa1pryweZ6XtZSqbAvBRcQho7cNsZeTYzSDXJhWW

3MvLoXwBdKy82DvUc18Bhtv4tcGhvNbJRte:  -0.00100000 Waves

2022.09.17 12:32 [2232931] smart account 3MvLoXwBdKy82DvUc18Bhtv4tcGhvNbJRte > SELF 0.00000000 Waves

{ "type": 13, "id": "6FvHTa1pryweZ6XtZSqbAvBRcQho7cNsZeTYzSDXJhWW", "fee": 100000, "feeAssetId": null, "timestamp": 1663407143788, "version": 2, "chainId": 84, "sender": "3MvLoXwBdKy82DvUc18Bhtv4tcGhvNbJRte", "senderPublicKey": "8kniNnhqS4yFAgjyL5p26FADdec1VLXx7SRcE3MHe5Km", "proofs": [ "4StygwEWU2PSXgvwcm1pYXus4FNfQtcUXA15cq9A9tqLvuhzxqVHcvLBRGCFfHxF2df3qhzm4hq7RX4tPeYixiBq" ], "script": "base64:BgIKCAISBgoECAgBAQEBCW9wQWxsb3dlZAEGYW1vdW50BAckbWF0Y2gwCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNNckd3WVVUOVZZQWh6eFNYVFdKTjlnYUM5NVd2SldNNXpHAgR0ZXN0CQDMCAIFBmFtb3VudAUDbmlsBQNuaWwDCQABAgUHJG1hdGNoMAIHQm9vbGVhbgQBYgUHJG1hdGNoMAMFAWIGCQACAQILbm90IGFsbG93ZWQJAAIBAiFvcEFsbG93ZWQ6IHVuZXhwZWN0ZWQgcmVzdWx0IHR5cGUBAWkBBnRlbGxtZQQEYWRkMQRhZGQyCmFkZDFBbW91bnQKYWRkMkFtb3VudAQFdGVzdEEJAQlvcEFsbG93ZWQBBQphZGQxQW1vdW50AwkAAAIFBXRlc3RBBQV0ZXN0QQQDcnQxCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJARFAZXh0ck5hdGl2ZSgxMDYyKQEFBGFkZDIFCmFkZDJBbW91bnQFBHVuaXQFA25pbAQFdGVzdEIJAQlvcEFsbG93ZWQBBQphZGQyQW1vdW50AwkAAAIFBXRlc3RCBQV0ZXN0QgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQERQGV4dHJOYXRpdmUoMTA2MikBBQRhZGQxBQphZGQxQW1vdW50BQR1bml0BQNuaWwJAAIBAg1ub3QgYWxsb3dlZF8yCQACAQINbm90IGFsbG93ZWRfMQAh32Xt", "height": 2232931, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8yfjR4QLN48egy9BrkptFbcJGpRPpst6iTHc8v7hMraQ Next: BN4ny3TF9tpc6YRAu9qGXvf9fZmRQeBS9iV1GLdvQ8oJ Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func opAllowed (amount) = match invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [amount], nil) {
5+ case b: Boolean =>
6+ if (b)
7+ then true
8+ else throw("not allowed")
9+ case _ =>
10+ throw("opAllowed: unexpected result type")
11+}
412
513
614 @Callable(i)
715 func tellme (add1,add2,add1Amount,add2Amount) = {
8- let testA = invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [add2Amount], nil)
16+ let testA = opAllowed(add1Amount)
917 if ((testA == testA))
1018 then {
1119 let rt1 = [ScriptTransfer(addressFromStringValue(add2), add2Amount, unit)]
12- let testB = invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [add1Amount], nil)
20+ let testB = opAllowed(add2Amount)
1321 if ((testB == testB))
1422 then [ScriptTransfer(addressFromStringValue(add1), add1Amount, unit)]
1523 else throw("not allowed_2")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+func opAllowed (amount) = match invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [amount], nil) {
5+ case b: Boolean =>
6+ if (b)
7+ then true
8+ else throw("not allowed")
9+ case _ =>
10+ throw("opAllowed: unexpected result type")
11+}
412
513
614 @Callable(i)
715 func tellme (add1,add2,add1Amount,add2Amount) = {
8- let testA = invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [add2Amount], nil)
16+ let testA = opAllowed(add1Amount)
917 if ((testA == testA))
1018 then {
1119 let rt1 = [ScriptTransfer(addressFromStringValue(add2), add2Amount, unit)]
12- let testB = invoke(addressFromStringValue("3MrGwYUT9VYAhzxSXTWJN9gaC95WvJWM5zG"), "test", [add1Amount], nil)
20+ let testB = opAllowed(add2Amount)
1321 if ((testB == testB))
1422 then [ScriptTransfer(addressFromStringValue(add1), add1Amount, unit)]
1523 else throw("not allowed_2")
1624 }
1725 else throw("not allowed_1")
1826 }
1927
2028

github/deemru/w8io/026f985 
41.81 ms