tx · 692nrDLjwM2AA8Rtjqpw7Zfzkg49ntpHpryrqnnQNoPX
3MyMnCNmDArm2v41gAshm7e9UVvm2LFRJvr: -0.05000000 Waves
2020.08.25 19:36 [1148576] smart account 3MyMnCNmDArm2v41gAshm7e9UVvm2LFRJvr > SELF 0.00000000 Waves
{
"type": 13,
"id": "692nrDLjwM2AA8Rtjqpw7Zfzkg49ntpHpryrqnnQNoPX",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1598373487355,
"version": 1,
"sender": "3MyMnCNmDArm2v41gAshm7e9UVvm2LFRJvr",
"senderPublicKey": "9AFFmZcoX6t23cSEWwNTf371XuM7LMuWC9V2dw3o4UW8",
"proofs": [
"ajwzqGHEizMvKWL4qRQ6jjp6ffC8sM1G9QDYMYweBmu1edthj9NqfH2sX8UFyehHBKYzzYCuosuEjp7DQ3cmntG"
],
"script": "base64:AAIDAAAAAAAAAAgIARIECgIBAQAAAAEBAAAAFHZvdGVySXNBbGxvd2VkVG9Wb3RlAAAAAQAAAA52b3RlclB1YmxpY0tleQQAAAANYWxla3NlaVB1YktleQEAAAAgYs01oEVTYwviL7FH6H2VE7a32XCracb5hel/8x1423YDCQEAAAACIT0AAAACBQAAAA52b3RlclB1YmxpY0tleQUAAAANYWxla3NlaVB1YktleQcGAAAAAQAAAAFpAQAAAAR2b3RlAAAAAgAAAAx0aGVWb3RlVG9waWMAAAAHdGhlVm90ZQQAAAAGYW1vdW50AAAAAAAAAAAKBAAAAAV1bml0cwAAAAAABfXhAAMJAQAAAAEhAAAAAQkBAAAAFHZvdGVySXNBbGxvd2VkVG9Wb3RlAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5CQAAAgAAAAECAAAAO1lvdSBjYW4gbm90IHZvdGUgYmVjYXVzZSB5b3UgYXJlIG5vdCBpbiB0aGUgbGlzdCBvZiB2b3RlcnMhAwkAAGYAAAACCQEAAAAMd2F2ZXNCYWxhbmNlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIFAAAABmFtb3VudAUAAAAFdW5pdHMJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQIAAAABXwkAAaQAAAABBQAAAAx0aGVWb3RlVG9waWMFAAAAB3RoZVZvdGUFAAAAA25pbAkAAAIAAAABCQABLAAAAAICAAAAPU5vdCBlbm91Z2ggYmFsYW5jZSB0byBiZSBhYmxlIHRvIHZvdGUhIFRoZSBuZWVkZWQgYmFsYW5jZSBpcyAJAAGkAAAAAQUAAAAGYW1vdW50AAAAALmxNBw=",
"chainId": 84,
"height": 1148576,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 48mnU57ACER9DNFwWkYLZQCHtWR68rRxuSRH3QU3nwqp
Next: Gd4NK2WMebBSPFZ7qbxaXw6v1DXieneEBuQAz473juMs
Diff:
Old | New | | Differences |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | | - | func vote (theVoteTopic,theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey))) |
---|
14 | | - | then throw("You can not vote because you are not in the list of voters!") |
---|
15 | | - | else if ((wavesBalance(i.caller) > 1000000000)) |
---|
16 | | - | then WriteSet([DataEntry(((toBase58String(i.callerPublicKey) + "_") + toString(theVoteTopic)), theVote)]) |
---|
17 | | - | else throw("Not enough balance!") |
---|
| 13 | + | func vote (theVoteTopic,theVote) = { |
---|
| 14 | + | let amount = 10 |
---|
| 15 | + | let units = 100000000 |
---|
| 16 | + | if (!(voterIsAllowedToVote(i.callerPublicKey))) |
---|
| 17 | + | then throw("You can not vote because you are not in the list of voters!") |
---|
| 18 | + | else if ((wavesBalance(i.caller) > (amount * units))) |
---|
| 19 | + | then WriteSet([DataEntry(((toBase58String(i.callerPublicKey) + "_") + toString(theVoteTopic)), theVote)]) |
---|
| 20 | + | else throw(("Not enough balance to be able to vote! The needed balance is " + toString(amount))) |
---|
| 21 | + | } |
---|
18 | 22 | | |
---|
19 | 23 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func voterIsAllowedToVote (voterPublicKey) = { |
---|
5 | 5 | | let alekseiPubKey = base58'7egSgBbsypKNPsde6asg7Bg9oFaG2eofuNHqBTkpZLRB' |
---|
6 | 6 | | if ((voterPublicKey != alekseiPubKey)) |
---|
7 | 7 | | then false |
---|
8 | 8 | | else true |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | | - | func vote (theVoteTopic,theVote) = if (!(voterIsAllowedToVote(i.callerPublicKey))) |
---|
14 | | - | then throw("You can not vote because you are not in the list of voters!") |
---|
15 | | - | else if ((wavesBalance(i.caller) > 1000000000)) |
---|
16 | | - | then WriteSet([DataEntry(((toBase58String(i.callerPublicKey) + "_") + toString(theVoteTopic)), theVote)]) |
---|
17 | | - | else throw("Not enough balance!") |
---|
| 13 | + | func vote (theVoteTopic,theVote) = { |
---|
| 14 | + | let amount = 10 |
---|
| 15 | + | let units = 100000000 |
---|
| 16 | + | if (!(voterIsAllowedToVote(i.callerPublicKey))) |
---|
| 17 | + | then throw("You can not vote because you are not in the list of voters!") |
---|
| 18 | + | else if ((wavesBalance(i.caller) > (amount * units))) |
---|
| 19 | + | then WriteSet([DataEntry(((toBase58String(i.callerPublicKey) + "_") + toString(theVoteTopic)), theVote)]) |
---|
| 20 | + | else throw(("Not enough balance to be able to vote! The needed balance is " + toString(amount))) |
---|
| 21 | + | } |
---|
18 | 22 | | |
---|
19 | 23 | | |
---|