tx · GwgbSWqtibdHZnHL7UujJPBY1hjEi4v7QAoBpDVgHUb9

3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe:  -0.01400000 Waves

2020.11.03 01:58 [1248311] smart account 3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe > SELF 0.00000000 Waves

{ "type": 13, "id": "GwgbSWqtibdHZnHL7UujJPBY1hjEi4v7QAoBpDVgHUb9", "fee": 1400000, "feeAssetId": null, "timestamp": 1604357706846, "version": 2, "chainId": 84, "sender": "3MpKvUfNxrgF7QotPjFwi8thMagSveNScKe", "senderPublicKey": "9GE2xN4fms9YNDxR1hGg52RynqDd8125TA42g4X29ZV7", "proofs": [ "3DAELeANBDJF31dwRx6HZAd2RbzkomDsquKtxTSJGwRG4YNZNSMjFyaE6MYM9Txe8VDr1bGsMSoQvui8XrVnZE8D" ], "script": "base64:AAIEAAAAAAAAABUIAhIGCgQIAQEIEgQKAggIEgMKAQgAAAAEAAAAAAJjZgkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQkAAlkAAAABAgAAACxKN3Z5b1VBOEdkNVFNcTRZVnRlZHB2MTlkd0NZcm9aRVlyTjhiS2dMenFWOAAAAAAEb3BicgEAAAAg8w+nJ903R+IZ8oK5CbdbBTqw7e4xxmj9cHNLUMCmE7gBAAAAEGdldEFsbG93ZWRUb2tlbnMAAAABAAAAB3Rva2VuSWQEAAAABWFsbG93BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAB3Rva2VuSWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcFAAAABWFsbG93AQAAAAtjb21wYXJlSGFzaAAAAAIAAAABYwAAAAFoCQAAAAAAAAIJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAAWMJAAJZAAAAAQUAAAABaAAAAAMAAAABaQEAAAAHb3BickJ1eQAAAAQAAAAHdG9rZW5JZAAAAANxdGQAAAAF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V0ZUVudHJ5AAAAAQUAAAAHdG9rZW5JZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAJjZgAAAAAAAJiWgAUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmJJERe", "height": 1248311, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7wHkTWcGU57iWPGimJtTKvZFy1qokkMd1r2Dcfg596BG Next: CXrwsBCHoc9zzcCq2u8bxuduwUtTFRvdQDUJJBtyKR39 Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromPublicKey(fromBase58String("J7vyoUA8Gd5QMq4YVtedpv19dwCYroZEYrN8bKgLzqV8"))
55
6-let b = base58'BN6ta4Sfmmh8tfmJE4pqJrSxLNJReAqnerPePYqkjcjG'
6+let b = base58'HMov2457acf5MEJr85fvXYL3vrTEevFpsEQkHh1yfdUT'
77
88 func c (d) = {
99 let e = {
2929 let q = c(d)
3030 if ((size(p) == 0))
3131 then throw("Payment for exchange is mandatory")
32- else if (!(h((d + toString(((l + m) + p[0].amount))), n)))
33- then throw("Purchase information is incompatible")
34- else if (if (isDefined(p[0].assetId))
35- then (q == false)
36- else false)
37- then throw("The used token is not accepted")
32+ else if ((size(p) == 2))
33+ then throw("Only one payment per transaction is allowed")
34+ else if (!(h((d + toString(((l + m) + p[0].amount))), n)))
35+ then throw("Purchase information is incompatible")
3836 else if (if (isDefined(p[0].assetId))
39- then (fromBase58String(d) != p[0].assetId)
37+ then (q == false)
4038 else false)
41- then throw("declared token is different from submitted token")
42- else {
43- let i = fraction(1, p[0].amount, 100)
39+ then throw("The used token is not accepted")
40+ else if (if (isDefined(p[0].assetId))
41+ then (fromBase58String(d) != p[0].assetId)
42+ else false)
43+ then throw("declared token is different from submitted token")
44+ else {
45+ let i = fraction(1, p[0].amount, 100)
4446 [ScriptTransfer(k.caller, l, b), ScriptTransfer(a, i, p[0].assetId)]
45- }
47+ }
4648 }
4749
4850
5052 @Callable(k)
5153 func tokenList (d,r) = {
5254 let s = toBase58String(k.caller.bytes)
53- if ((s != toString(this)))
55+ if (if ((s != toString(this)))
56+ then true
57+ else (s != toString(a)))
5458 then throw("The address is not authorized to list tokens")
5559 else [StringEntry(d, r), ScriptTransfer(a, 1000000, unit)]
5660 }
6064 @Callable(k)
6165 func tokenDelist (d) = {
6266 let s = toBase58String(k.caller.bytes)
63- if ((s != toString(this)))
67+ if (if ((s != toString(this)))
68+ then true
69+ else (s != toString(a)))
6470 then throw("The address is not authorized to delist tokens")
6571 else [DeleteEntry(d), ScriptTransfer(a, 10000000, unit)]
6672 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromPublicKey(fromBase58String("J7vyoUA8Gd5QMq4YVtedpv19dwCYroZEYrN8bKgLzqV8"))
55
6-let b = base58'BN6ta4Sfmmh8tfmJE4pqJrSxLNJReAqnerPePYqkjcjG'
6+let b = base58'HMov2457acf5MEJr85fvXYL3vrTEevFpsEQkHh1yfdUT'
77
88 func c (d) = {
99 let e = {
1010 let f = getString(this, d)
1111 if ($isInstanceOf(f, "String"))
1212 then {
1313 let g = f
1414 g
1515 }
1616 else false
1717 }
1818 e
1919 }
2020
2121
2222 func h (i,j) = (keccak256(blake2b256(toBytes(i))) == fromBase58String(j))
2323
2424
2525 @Callable(k)
2626 func opbrBuy (d,l,m,n) = {
2727 let o = toBase58String(k.caller.bytes)
2828 let p = k.payments
2929 let q = c(d)
3030 if ((size(p) == 0))
3131 then throw("Payment for exchange is mandatory")
32- else if (!(h((d + toString(((l + m) + p[0].amount))), n)))
33- then throw("Purchase information is incompatible")
34- else if (if (isDefined(p[0].assetId))
35- then (q == false)
36- else false)
37- then throw("The used token is not accepted")
32+ else if ((size(p) == 2))
33+ then throw("Only one payment per transaction is allowed")
34+ else if (!(h((d + toString(((l + m) + p[0].amount))), n)))
35+ then throw("Purchase information is incompatible")
3836 else if (if (isDefined(p[0].assetId))
39- then (fromBase58String(d) != p[0].assetId)
37+ then (q == false)
4038 else false)
41- then throw("declared token is different from submitted token")
42- else {
43- let i = fraction(1, p[0].amount, 100)
39+ then throw("The used token is not accepted")
40+ else if (if (isDefined(p[0].assetId))
41+ then (fromBase58String(d) != p[0].assetId)
42+ else false)
43+ then throw("declared token is different from submitted token")
44+ else {
45+ let i = fraction(1, p[0].amount, 100)
4446 [ScriptTransfer(k.caller, l, b), ScriptTransfer(a, i, p[0].assetId)]
45- }
47+ }
4648 }
4749
4850
4951
5052 @Callable(k)
5153 func tokenList (d,r) = {
5254 let s = toBase58String(k.caller.bytes)
53- if ((s != toString(this)))
55+ if (if ((s != toString(this)))
56+ then true
57+ else (s != toString(a)))
5458 then throw("The address is not authorized to list tokens")
5559 else [StringEntry(d, r), ScriptTransfer(a, 1000000, unit)]
5660 }
5761
5862
5963
6064 @Callable(k)
6165 func tokenDelist (d) = {
6266 let s = toBase58String(k.caller.bytes)
63- if ((s != toString(this)))
67+ if (if ((s != toString(this)))
68+ then true
69+ else (s != toString(a)))
6470 then throw("The address is not authorized to delist tokens")
6571 else [DeleteEntry(d), ScriptTransfer(a, 10000000, unit)]
6672 }
6773
6874
6975 @Verifier(t)
7076 func u () = sigVerify(t.bodyBytes, t.proofs[0], t.senderPublicKey)
7177

github/deemru/w8io/169f3d6 
28.88 ms