tx · EChzQhiCgAU2HHRyo47mRLKhWRvC53ZdvvQ8R9Rvy6sf

3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ:  -0.01400000 Waves

2021.09.22 22:38 [1714697] smart account 3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ > SELF 0.00000000 Waves

{ "type": 13, "id": "EChzQhiCgAU2HHRyo47mRLKhWRvC53ZdvvQ8R9Rvy6sf", "fee": 1400000, "feeAssetId": null, "timestamp": 1632339534955, "version": 2, "chainId": 84, "sender": "3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ", "senderPublicKey": "BMLuSYJ8rvQD55waCoKpzCBhJAbY8s9pp4V5ZgxuzCBD", "proofs": [ "2jppPFw1zwFD5mMHsyoi9SRWgeVa8J2J1QzXpaRDGTrNgAGdwnXiC5fNJXwZYSMKiFDre92a3pFTA768yXPtkbos" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAKQTRBQXNzZXRJRAEAAAAg/sQa4d7v52kifRLo73ftXd9xD7wgh9JaaHT98W4IWDcAAAAAC1VTRFRBc3NldElEAQAAACAIZYS3D/CKahrz4mjoLgiQJMPTJ1gDzSz2Ll4L39oVpAAAAAEAAAABaQEAAAAKV2Vla2x5Vm90ZQAAAAEAAAAORmF2b3VyaXRlQXNzZXQEAAAAA3BtdAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAADlXZWVrbHkgVm90ZSBOZWVkIDAuMDAwMSBBNEEgVG9rZW4gYXMgQXR0YWNoZWQgcGF5bWVudFsxXS4EAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAOV2VlazBUaW1lc3RhbXAAAAABexKuBoAEAAAACGVhY2h3ZWVrAAAAAAAkDIQABAAAAAhlYWNoaG91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udHJ5AAAAAgIAAAARTGFzdFdlZWtUaW1lc3RhbXAFAAAADlRTVXB0b1Bhc3RXZWVrCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABJMYXN0QmxvY2tUaW1lU3RhbXAIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAADkZhdm91cml0ZUFzc2V0AgAAAAxfVG90YWxfVm90ZXMFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAApBNEFBc3NldElEBQAAAANuaWwJAAACAAAAAQIAAAAlQmxhbmsvV3JvbmcgSW5wdXQgRW50ZXJlZCBGb3IgVm90aW5nLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5gO1jmQ==", "height": 1714697, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: W1gXDyp1RMMwbZFEmmFXj94pFDoEEXbqKpy87yETPnR Next: yyBYmrVxbe9G3sAsk8LNrwMw5h7CtPN5rveU7HnSjMB Diff:
OldNewDifferences
1111 then i.payments[0]
1212 else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].")
1313 let currentKey = toBase58String(i.caller.bytes)
14- let Week0Timestamp = 1628125200000
14+ let Week0Timestamp = 1628106000000
1515 let eachweek = 604800000
1616 let eachhour = 3600000
1717 let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let A4AAssetID = base58'J9VzWPfRSQyCbEv5oWpxLSihigbpbJsGBHJZV9Ct8ook'
55
66 let USDTAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
77
88 @Callable(i)
99 func WeeklyVote (FavouriteAsset) = {
1010 let pmt = if ((size(i.payments) == 1))
1111 then i.payments[0]
1212 else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].")
1313 let currentKey = toBase58String(i.caller.bytes)
14- let Week0Timestamp = 1628125200000
14+ let Week0Timestamp = 1628106000000
1515 let eachweek = 604800000
1616 let eachhour = 3600000
1717 let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1)
1818 let TSUptoPastWeek = (Week0Timestamp + ((currentrunningweek - 1) * eachweek))
1919 let votingpausetime = (TSUptoPastWeek + 360000)
2020 let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID)
2121 let fetchvotes = getIntegerValue(this, (FavouriteAsset + "_Total_Votes"))
2222 let totalvotes = (fetchvotes + 1)
2323 if ((100000000 > checkassetbal))
2424 then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.")
2525 else if ((pmt.assetId != A4AAssetID))
2626 then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only."))
2727 else if ((pmt.amount != 10000))
2828 then throw("Please Attach Exact 0.0001 A4A To Vote.")
2929 else if ((votingpausetime > lastBlock.timestamp))
3030 then throw((("Voting is paused for Next " + toString(((lastBlock.timestamp - votingpausetime) / 60000))) + " Minutes"))
3131 else if (if (if (if ((FavouriteAsset == "A4A"))
3232 then true
3333 else (FavouriteAsset == "ARRR"))
3434 then true
3535 else (FavouriteAsset == "TN"))
3636 then true
3737 else (FavouriteAsset == "WAVES"))
3838 then [StringEntry(("Voted_Asset_" + currentKey), FavouriteAsset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>"), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry("Week0Timestamp", Week0Timestamp), IntegerEntry("LastWeekTimestamp", TSUptoPastWeek), IntegerEntry("LastBlockTimeStamp", lastBlock.timestamp), IntegerEntry((FavouriteAsset + "_Total_Votes"), totalvotes), ScriptTransfer(i.caller, 1, A4AAssetID)]
3939 else throw("Blank/Wrong Input Entered For Voting.")
4040 }
4141
4242
4343 @Verifier(tx)
4444 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4545

github/deemru/w8io/169f3d6 
27.12 ms