tx · 8LaJ5V67597dqQwdHx8ZuRGg6FyDfdBcWVMh7q68AFLW
3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ: -0.01400000 Waves
2021.09.21 19:25 [1713043] smart account 3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ > SELF 0.00000000 Waves
{
"type": 13,
"id": "8LaJ5V67597dqQwdHx8ZuRGg6FyDfdBcWVMh7q68AFLW",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1632241547669,
"version": 2,
"chainId": 84,
"sender": "3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ",
"senderPublicKey": "BMLuSYJ8rvQD55waCoKpzCBhJAbY8s9pp4V5ZgxuzCBD",
"proofs": [
"vSwuvaoEVqdB2aSiwYV9tUjyWAVbGBrp4UyQgS8PUwPRFZaVPHVv31X8ysf8czrAvi2DmitiKLaw4mAF57VQy3P"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAKQTRBQXNzZXRJRAEAAAAg/sQa4d7v52kifRLo73ftXd9xD7wgh9JaaHT98W4IWDcAAAAAC1VTRFRBc3NldElEAQAAACAIZYS3D/CKahrz4mjoLgiQJMPTJ1gDzSz2Ll4L39oVpAAAAAEAAAABaQEAAAAEVm90ZQAAAAEAAAAORmF2b3VyaXRlQXNzZXQEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAADQwLjAwMDEgQTRBIFRva2VuIGlzIHJlcXVpcmVkIGFzIEF0dGFjaGVkIHBheW1lbnRbMV0uBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAC1dlZWswSGVpZ2h0AAAAAAAAGfPyBAAAAAhlYWNod2VlawAAAAAAAAAnYAQAAAASY3VycmVudHJ1bm5pbmd3ZW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W5nRW50cnkAAAACAgAAAAdtZXNzYWdlAgAAACQ8aDE+WW91IFZvdGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAE0N1cnJlbnRfVm90aW5nX1dlZWsFAAAAEmN1cnJlbnRydW5uaW5nd2VlawkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAEFAAAACkE0QUFzc2V0SUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5W053pw==",
"height": 1713043,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 4cmPPNGQB4joFJGHSgxdW16s7FmQK9NxKWzc5E8fKkzh
Next: twGAAwE7pin71SFyHNyocJ2LaTA8WXRQVbKkqMaU7hX
Diff:
Old | New | | Differences |
---|
15 | 15 | | let eachweek = 10080 |
---|
16 | 16 | | let currentrunningweek = ((height - Week0Height) / eachweek) |
---|
17 | 17 | | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) |
---|
18 | | - | if ((FavouriteAsset != "A4A")) |
---|
19 | | - | then throw("Wrong Asset Selected for Voting.") |
---|
| 18 | + | if (if (if (if ((FavouriteAsset != "A4A")) |
---|
| 19 | + | then true |
---|
| 20 | + | else (FavouriteAsset != "ARRR")) |
---|
| 21 | + | then true |
---|
| 22 | + | else (FavouriteAsset != "TN")) |
---|
| 23 | + | then true |
---|
| 24 | + | else (FavouriteAsset != "WAVES")) |
---|
| 25 | + | then [StringEntry("Voted_Asset", FavouriteAsset)] |
---|
20 | 26 | | else if ((100000000 > checkassetbal)) |
---|
21 | 27 | | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") |
---|
22 | 28 | | else if ((pmt.assetId != A4AAssetID)) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let A4AAssetID = base58'J9VzWPfRSQyCbEv5oWpxLSihigbpbJsGBHJZV9Ct8ook' |
---|
5 | 5 | | |
---|
6 | 6 | | let USDTAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | 9 | | func Vote (FavouriteAsset) = { |
---|
10 | 10 | | let pmt = if ((size(i.payments) == 1)) |
---|
11 | 11 | | then i.payments[0] |
---|
12 | 12 | | else throw("0.0001 A4A Token is required as Attached payment[1].") |
---|
13 | 13 | | let currentKey = toBase58String(i.caller.bytes) |
---|
14 | 14 | | let Week0Height = 1700850 |
---|
15 | 15 | | let eachweek = 10080 |
---|
16 | 16 | | let currentrunningweek = ((height - Week0Height) / eachweek) |
---|
17 | 17 | | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) |
---|
18 | | - | if ((FavouriteAsset != "A4A")) |
---|
19 | | - | then throw("Wrong Asset Selected for Voting.") |
---|
| 18 | + | if (if (if (if ((FavouriteAsset != "A4A")) |
---|
| 19 | + | then true |
---|
| 20 | + | else (FavouriteAsset != "ARRR")) |
---|
| 21 | + | then true |
---|
| 22 | + | else (FavouriteAsset != "TN")) |
---|
| 23 | + | then true |
---|
| 24 | + | else (FavouriteAsset != "WAVES")) |
---|
| 25 | + | then [StringEntry("Voted_Asset", FavouriteAsset)] |
---|
20 | 26 | | else if ((100000000 > checkassetbal)) |
---|
21 | 27 | | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") |
---|
22 | 28 | | else if ((pmt.assetId != A4AAssetID)) |
---|
23 | 29 | | then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only.")) |
---|
24 | 30 | | else if ((10000 > pmt.amount)) |
---|
25 | 31 | | then throw("Please Attach minimum 0.0001 A4A To Vote.") |
---|
26 | 32 | | else [StringEntry("message", "<h1>You Voted Successfully!</h1><br>"), IntegerEntry("Current_Voting_Week", currentrunningweek), ScriptTransfer(i.caller, 1, A4AAssetID)] |
---|
27 | 33 | | } |
---|
28 | 34 | | |
---|
29 | 35 | | |
---|
30 | 36 | | @Verifier(tx) |
---|
31 | 37 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
32 | 38 | | |
---|