tx · 46RrUKYJx8HcXxeSoF985Ho7kpuoF8CGMVhv7VYBLdx2

3PDVDYZiwJzK3pu8vcknuLiKCYBPx6XZntG:  -0.01400000 Waves

2021.11.19 01:22 [2862078] smart account 3PDVDYZiwJzK3pu8vcknuLiKCYBPx6XZntG > SELF 0.00000000 Waves

{ "type": 13, "id": "46RrUKYJx8HcXxeSoF985Ho7kpuoF8CGMVhv7VYBLdx2", "fee": 1400000, "feeAssetId": null, "timestamp": 1637274183034, "version": 2, "chainId": 87, "sender": "3PDVDYZiwJzK3pu8vcknuLiKCYBPx6XZntG", "senderPublicKey": "4ShkZWe2MDbgY7rhoFHRtwRbgZH6ourPujsiK3hSi93S", "proofs": [ "62QXJPNbt6py62As4kGJwUGBKj6LUw8nxBFqU7F9e8kao8CyXCaTsv1W4Rwgi7qgpRdkPaCZgMp7tS4MN7Triiv3" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAttYWluQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBV+u5HRSy4cApD3u5eFr/uhA5BLXDAd7x/wAAAAAIYXNzZXRJZHMJAARMAAAAAgEAAAAgyw1lYQ6JlVg1ekGLZhtvXKi4LESOnMn5thiFsOKWzp0JAARMAAAAAgEAAAAglZ6iocT9UzqWUmKGbc9u7gOwFOd4kCbNcmqp/DeogegJAARMAAAAAgEAAAAgRExCPQh9u1DvW+8PqUxBmyOjtHWRvNXKU0Jc00pjQTEJAARMAAAAAgEAAAAgPFMDXQuIrT5egMZzyIgkcyZtwz9bRrI3YNRbWQUZH/YJAARMAAAAAgEAAAAgRyaqjMo3slXzOEUyKJmcHd7PxEmDEfdsI6p5wJ0W+B4JAARMAAAAAgEAAAAgvEabRPMoAzvnfvma5kaWBu6I80q/daHoKad/yhdLmAkJAARMAAAAAgEAAAAgN9Rz/hBjs0Hw+I8Ll4RFg2ff4HRHlJ6Qq/d6SC86JQ0JAARMAAAAAgEAAAAgA4Qr7DRvSh+u2ezgyqBg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maW5hbEluBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAABVnZW5lcmF0ZUluZGV4QW5kU3Rha2UAAAAABAAAAA1QSXNzdWVkQW1vdW50CQEAAAAFdmFsdWUAAAABAwkAAAEAAAACCQAD/AAAAAQFAAAAC21haW5BZGRyZXNzAgAAAA1nZW5lcmF0ZUluZGV4BQAAAANuaWwIBQAAAAFpAAAACHBheW1lbnRzAgAAAANJbnQJAAP8AAAABAUAAAALbWFpbkFkZHJlc3MCAAAADWdlbmVyYXRlSW5kZXgFAAAAA25pbAgFAAAAAWkAAAAIcGF5bWVudHMFAAAABHVuaXQDCQAAAAAAAAIFAAAADVBJc3N1ZWRBbW91bnQFAAAADVBJc3N1ZWRBbW91bnQEAAAAC3N0YWtlSW52b2tlCQAD/AAAAAQFAAAAC21haW5BZGRyZXNzAgAAAApzdGFrZUluZGV4BQAAAANuaWwJAARMAAAAAgkBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAAC3Bvb2xJbmRleElkBQAAAA1QSXNzdWVkQW1vdW50BQAAAANuaWwDCQAAAAAAAAIFAAAAC3N0YWtlSW52b2tlBQAAAAtzdGFrZUludm9rZQUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAA0l1liw==", "height": 2862078, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A847TgkvqMsuLQEUM7ESYpSsWMMythtyrKCa51a5SAcc Next: F1edhfrCgMqZpsogDvTMxRZ6PQZwCGMATZBYx5G4514T Diff:
OldNewDifferences
77
88 let baseAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS'
99
10+let poolIndexId = base58'J5U3XKU5vTFfk32Qn8uoYxDeJ6JCqG1UTnwN1Kxv9X1w'
11+
1012 @Callable(i)
1113 func generateIndexWithOneToken () = {
1214 let tokenId = i.payments[0].assetId
13- let amount = i.payments[0].amount
15+ let amount = (i.payments[0].amount / 10)
1416 if ((tokenId != baseAssetId))
1517 then throw("best gamefi token only")
1618 else {
1719 func handler (accum,assetId) = {
18- let in = value(if ($isInstanceOf(invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, (amount / 10))]), "Int"))
19- then invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, (amount / 10))])
20+ let in = value(if ($isInstanceOf(invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, amount)]), "Int"))
21+ then invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, amount)])
2022 else unit)
2123 if ((in == in))
2224 then (accum ++ [AttachedPayment(assetId, in)])
2628 let result = {
2729 let $l = assetIds
2830 let $s = size($l)
29- let $acc0 = [AttachedPayment(baseAssetId, (amount / 10))]
31+ let $acc0 = [AttachedPayment(baseAssetId, amount)]
3032 func 1 ($a,$i) = if (($i >= $s))
3133 then $a
3234 else handler($a, $l[$i])
4951 }
5052
5153
54+
55+@Callable(i)
56+func generateIndexAndStake () = {
57+ let PIssuedAmount = value(if ($isInstanceOf(invoke(mainAddress, "generateIndex", nil, i.payments), "Int"))
58+ then invoke(mainAddress, "generateIndex", nil, i.payments)
59+ else unit)
60+ if ((PIssuedAmount == PIssuedAmount))
61+ then {
62+ let stakeInvoke = invoke(mainAddress, "stakeIndex", nil, [AttachedPayment(poolIndexId, PIssuedAmount)])
63+ if ((stakeInvoke == stakeInvoke))
64+ then nil
65+ else throw("Strict value is not equal to itself.")
66+ }
67+ else throw("Strict value is not equal to itself.")
68+ }
69+
70+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let mainAddress = Address(base58'3PPRHHF9JKvDLkAc3aHD3Kd5tRZp1CoqAJa')
55
66 let assetIds = [base58'EfdcPXw7o7rrrPWmMBr2sa66Dk95n56622ngujbaGhye', base58'B543bkZcZNo5GrUnd5fxB6EwkiJhAVyKCkPn5nWzZC2s', base58'5bcAh1r6ydrpk44FEmrnmJQjumgKo3NKEEsyfgmZYwxC', base58'54UszKAj3MtYmkdRCqSXAcaQLaVALBy7CCrVkfmfzhxR', base58'5nk9JW8yRonyNBEwhChoksLxpBECVxbVLqaNuQs9EJn1', base58'Dfx6LJPndo1h5Umk9SofDhMDs6Gi8cHyT3873pSgoASU', base58'4kwKSf4Bx2Wq8YxKnVZBhcEHyXzEtJ2pw7ixfJgirwf2', base58'Ej7kEzxvUsoiMtJKiuFpMD9tC6qfCADpZynyW2vqcWW', base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p']
77
88 let baseAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS'
99
10+let poolIndexId = base58'J5U3XKU5vTFfk32Qn8uoYxDeJ6JCqG1UTnwN1Kxv9X1w'
11+
1012 @Callable(i)
1113 func generateIndexWithOneToken () = {
1214 let tokenId = i.payments[0].assetId
13- let amount = i.payments[0].amount
15+ let amount = (i.payments[0].amount / 10)
1416 if ((tokenId != baseAssetId))
1517 then throw("best gamefi token only")
1618 else {
1719 func handler (accum,assetId) = {
18- let in = value(if ($isInstanceOf(invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, (amount / 10))]), "Int"))
19- then invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, (amount / 10))])
20+ let in = value(if ($isInstanceOf(invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, amount)]), "Int"))
21+ then invoke(mainAddress, "swap", [toBase58String(assetId), 0], [AttachedPayment(baseAssetId, amount)])
2022 else unit)
2123 if ((in == in))
2224 then (accum ++ [AttachedPayment(assetId, in)])
2325 else throw("Strict value is not equal to itself.")
2426 }
2527
2628 let result = {
2729 let $l = assetIds
2830 let $s = size($l)
29- let $acc0 = [AttachedPayment(baseAssetId, (amount / 10))]
31+ let $acc0 = [AttachedPayment(baseAssetId, amount)]
3032 func 1 ($a,$i) = if (($i >= $s))
3133 then $a
3234 else handler($a, $l[$i])
3335
3436 func 2 ($a,$i) = if (($i >= $s))
3537 then $a
3638 else throw("List size exceeds 9")
3739
3840 2(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9)
3941 }
4042 if ((result == result))
4143 then {
4244 let finalIn = invoke(mainAddress, "generateIndex", nil, result)
4345 if ((finalIn == finalIn))
4446 then nil
4547 else throw("Strict value is not equal to itself.")
4648 }
4749 else throw("Strict value is not equal to itself.")
4850 }
4951 }
5052
5153
54+
55+@Callable(i)
56+func generateIndexAndStake () = {
57+ let PIssuedAmount = value(if ($isInstanceOf(invoke(mainAddress, "generateIndex", nil, i.payments), "Int"))
58+ then invoke(mainAddress, "generateIndex", nil, i.payments)
59+ else unit)
60+ if ((PIssuedAmount == PIssuedAmount))
61+ then {
62+ let stakeInvoke = invoke(mainAddress, "stakeIndex", nil, [AttachedPayment(poolIndexId, PIssuedAmount)])
63+ if ((stakeInvoke == stakeInvoke))
64+ then nil
65+ else throw("Strict value is not equal to itself.")
66+ }
67+ else throw("Strict value is not equal to itself.")
68+ }
69+
70+

github/deemru/w8io/3ef1775 
34.36 ms