tx · 7VMzXJ6UAdFaErwHJcRUuArNqPvyuSDJtgmSMrc1qW5i
3Mq5upPvyutNuEDeYttuzZfQHv4Y4uXuvv5: -0.05000000 Waves
2021.08.18 15:48 [1663798] smart account 3Mq5upPvyutNuEDeYttuzZfQHv4Y4uXuvv5 > SELF 0.00000000 Waves
{
"type": 13,
"id": "7VMzXJ6UAdFaErwHJcRUuArNqPvyuSDJtgmSMrc1qW5i",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1629290908704,
"version": 2,
"chainId": 84,
"sender": "3Mq5upPvyutNuEDeYttuzZfQHv4Y4uXuvv5",
"senderPublicKey": "97jE6RtnPXGL5TBusvVdFPvxKvHs6wgfQhjd2MphH8ot",
"proofs": [
"3YSD1rXcbL6KHeB94AipUGEwhmMxiyxqxa2C6xNe2qBDPCxa5YSmYasBV8yh9kyjeXJmTKziFtWnYCaZ5eqAvxCx"
],
"script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAADAAAAAApzd29wZmlEYXBwAQAAABoBVLt+TAXn+MQlFxBKsN8Gb5+SrWkds6awNAAAAAAIc3dvcFZvdGUBAAAAGgFUsp85klnuBxWMulC8BIcVCSYjDK/hz1cvAAAAAAZ1c2RuSWQBAAAAIG8ko8qrMNxSKZjoLGFa7lp/I03CLXW76Z2qVODS0AfBAAAAAgAAAAFpAQAAAAtydW5FeGNoYW5nZQAAAAAEAAAACSR0MDMwNDM3OQkABRQAAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQEAAAACXBtdEFtb3VudAgFAAAACSR0MDMwNDM3OQAAAAJfMQQAAAAKcG10QXNzZXRJZAgFAAAACSR0MDMwNDM3OQAAAAJfMgQAAAAHcGF5bWVudAkBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAACnBtdEFzc2V0SWQFAAAACXBtdEF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AAAAAAAACBQAAAAFyBQAAAAFyBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkwx+OQ",
"height": 1663798,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: G8k4qTBpBxQEEdmNeBz8tMwd5SbMi2dJF9siW1bDqf9c
Next: EcEPEkqxb3gKyvodqm4VjN7RMwjCso9Q9t8oqUQkBeYw
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let swopfiDapp = base58'3N71TS4RSqLDJgLw2h9cdwUwhfQ7aBoaFb1' |
---|
5 | 5 | | |
---|
| 6 | + | let swopVote = base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN' |
---|
| 7 | + | |
---|
6 | 8 | | let usdnId = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' |
---|
7 | 9 | | |
---|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func runExchange () = { |
---|
10 | | - | let $t0245320 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
11 | | - | let pmtAmount = $t0245320._1 |
---|
12 | | - | let pmtAssetId = $t0245320._2 |
---|
| 12 | + | let $t0304379 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
| 13 | + | let pmtAmount = $t0304379._1 |
---|
| 14 | + | let pmtAssetId = $t0304379._2 |
---|
13 | 15 | | let payment = AttachedPayment(pmtAssetId, pmtAmount) |
---|
14 | 16 | | let startBalance = assetBalance(this, usdnId) |
---|
15 | 17 | | if ((startBalance == startBalance)) |
---|
|
28 | 30 | | } |
---|
29 | 31 | | |
---|
30 | 32 | | |
---|
| 33 | + | |
---|
| 34 | + | @Callable(i) |
---|
| 35 | + | func runVote () = { |
---|
| 36 | + | let poolVotePools = ["3N3J2dJA73awbzbP9dBP9JtEwENAxZQArLw"] |
---|
| 37 | + | let poolVoteVotes = [99925229] |
---|
| 38 | + | let r = invoke(Address(swopVote), "votePoolWeight", [poolVotePools, poolVoteVotes], nil) |
---|
| 39 | + | if ((r == r)) |
---|
| 40 | + | then nil |
---|
| 41 | + | else throw("Strict value is not equal to itself.") |
---|
| 42 | + | } |
---|
| 43 | + | |
---|
| 44 | + | |
---|
31 | 45 | | @Verifier(tx) |
---|
32 | 46 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
33 | 47 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let swopfiDapp = base58'3N71TS4RSqLDJgLw2h9cdwUwhfQ7aBoaFb1' |
---|
5 | 5 | | |
---|
| 6 | + | let swopVote = base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN' |
---|
| 7 | + | |
---|
6 | 8 | | let usdnId = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' |
---|
7 | 9 | | |
---|
8 | 10 | | @Callable(i) |
---|
9 | 11 | | func runExchange () = { |
---|
10 | | - | let $t0245320 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
11 | | - | let pmtAmount = $t0245320._1 |
---|
12 | | - | let pmtAssetId = $t0245320._2 |
---|
| 12 | + | let $t0304379 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
| 13 | + | let pmtAmount = $t0304379._1 |
---|
| 14 | + | let pmtAssetId = $t0304379._2 |
---|
13 | 15 | | let payment = AttachedPayment(pmtAssetId, pmtAmount) |
---|
14 | 16 | | let startBalance = assetBalance(this, usdnId) |
---|
15 | 17 | | if ((startBalance == startBalance)) |
---|
16 | 18 | | then { |
---|
17 | 19 | | let r = invoke(Address(swopfiDapp), "exchange", [1], [payment]) |
---|
18 | 20 | | if ((r == r)) |
---|
19 | 21 | | then { |
---|
20 | 22 | | let diff = (assetBalance(this, usdnId) - startBalance) |
---|
21 | 23 | | if ((diff == diff)) |
---|
22 | 24 | | then [ScriptTransfer(i.caller, diff, usdnId)] |
---|
23 | 25 | | else throw("Strict value is not equal to itself.") |
---|
24 | 26 | | } |
---|
25 | 27 | | else throw("Strict value is not equal to itself.") |
---|
26 | 28 | | } |
---|
27 | 29 | | else throw("Strict value is not equal to itself.") |
---|
28 | 30 | | } |
---|
29 | 31 | | |
---|
30 | 32 | | |
---|
| 33 | + | |
---|
| 34 | + | @Callable(i) |
---|
| 35 | + | func runVote () = { |
---|
| 36 | + | let poolVotePools = ["3N3J2dJA73awbzbP9dBP9JtEwENAxZQArLw"] |
---|
| 37 | + | let poolVoteVotes = [99925229] |
---|
| 38 | + | let r = invoke(Address(swopVote), "votePoolWeight", [poolVotePools, poolVoteVotes], nil) |
---|
| 39 | + | if ((r == r)) |
---|
| 40 | + | then nil |
---|
| 41 | + | else throw("Strict value is not equal to itself.") |
---|
| 42 | + | } |
---|
| 43 | + | |
---|
| 44 | + | |
---|
31 | 45 | | @Verifier(tx) |
---|
32 | 46 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
33 | 47 | | |
---|