tx · EvZwPniF7GXd4qMFYDA1a1GBThiAqdC82mH6XVZH9K1C

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01400000 Waves

2021.12.10 14:12 [1828073] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "EvZwPniF7GXd4qMFYDA1a1GBThiAqdC82mH6XVZH9K1C", "fee": 1400000, "feeAssetId": null, "timestamp": 1639134824874, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "Qbx5b9sWHiTAcNQT9Xq4Es81HGXiRyZWJw3nF322uDztkJUKvo2RqU2eZMLxZDQVVqmTGsw9ER8kecaoG4rNKqo" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXN0YXJ0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAARYmFsYW5jZWZvcmFpcmRyb3AAAAAAAAAPQkAFAAAAA25pbAAAAAFpAQAAAARjYWxsAAAAAQAAAARpZDU4BAAAABFiYWxhbmNlZm9yYWlyZHJvcAkAA/AAAAACBQAAAAdhaXJkcm9wBQAAAAV0b2tlbgQAAAAKZHJvcGFtb3VudAAAAAAAAAAAZAQAAAAIaXNlbm91Z2gDCQAAZwAAAAIFAAAAEWJhbGFuY2Vmb3JhaXJkcm9wBQAAAApkcm9wYW1vdW50BgkAAAIAAAABAgAAAApub3QgZW5vdWdoAwkAAAAAAAACBQAAAAhpc2Vub3VnaAUAAAAIaXNlbm91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udHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAARtZXNzCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB2JhbGFuY2UJAAGkAAAAAQUAAAARYmFsYW5jZWZvcmFpcmRyb3AFAAAAA25pbAkAAAIAAAABAgAAAAtub3QgcHJvb3ZlZAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlecQ2etM=", "height": 1828073, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 79LmQbUfwjNGLUWbLDwjGY4qtynC2NDw4VLy3ZzuLPbp Next: 5n7ZjVqiYiJbYZZ3RcwogHQemvevdpfRDj6ddzCARr8M Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let token = base58'GZc7eKnq2KJwqetRmUzSqr2ZaCGseDZufSocz83sUNoo'
5+
6+let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV')
7+
8+@Callable(i)
9+func start () = [IntegerEntry("balanceforairdrop", 1000000)]
10+
411
512
613 @Callable(i)
714 func call (id58) = {
8- let id = fromBase58String(id58)
9- let callerAdress = Address(i.caller.bytes)
10- let time = 1639131654752
11- let trtime = match transferTransactionById(id) {
12- case ttx: TransferTransaction =>
13- ttx.timestamp
14- case _ =>
15- throw("Can't find transaction")
16- }
17- let trsender = match transferTransactionById(id) {
18- case ttx: TransferTransaction =>
19- ttx.sender
20- case _ =>
21- throw("Can't find transaction")
22- }
23- let mess = if ((trtime > time))
24- then ("overtime: " + toString(trtime))
25- else if ((callerAdress != trsender))
26- then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
27- else "prooved"
28-[StringEntry("-", mess)]
15+ let balanceforairdrop = assetBalance(airdrop, token)
16+ let dropamount = 100
17+ let isenough = if ((balanceforairdrop >= dropamount))
18+ then true
19+ else throw("not enough")
20+ if ((isenough == isenough))
21+ then {
22+ let id = fromBase58String(id58)
23+ let callerAdress = Address(i.caller.bytes)
24+ let time = 1639131654752
25+ let trtime = match transferTransactionById(id) {
26+ case ttx: TransferTransaction =>
27+ ttx.timestamp
28+ case _ =>
29+ throw("Can't find transaction")
30+ }
31+ let trsender = match transferTransactionById(id) {
32+ case ttx: TransferTransaction =>
33+ ttx.sender
34+ case _ =>
35+ throw("Can't find transaction")
36+ }
37+ let isprooved = if (if ((trtime > time))
38+ then true
39+ else (callerAdress != trsender))
40+ then false
41+ else true
42+ let mess = if ((trtime > time))
43+ then ("overtime: " + toString(trtime))
44+ else if ((callerAdress != trsender))
45+ then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
46+ else "prooved"
47+ if (isprooved)
48+ then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balanceforairdrop))]
49+ else throw("not prooved")
50+ }
51+ else throw("Strict value is not equal to itself.")
2952 }
3053
3154
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let token = base58'GZc7eKnq2KJwqetRmUzSqr2ZaCGseDZufSocz83sUNoo'
5+
6+let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV')
7+
8+@Callable(i)
9+func start () = [IntegerEntry("balanceforairdrop", 1000000)]
10+
411
512
613 @Callable(i)
714 func call (id58) = {
8- let id = fromBase58String(id58)
9- let callerAdress = Address(i.caller.bytes)
10- let time = 1639131654752
11- let trtime = match transferTransactionById(id) {
12- case ttx: TransferTransaction =>
13- ttx.timestamp
14- case _ =>
15- throw("Can't find transaction")
16- }
17- let trsender = match transferTransactionById(id) {
18- case ttx: TransferTransaction =>
19- ttx.sender
20- case _ =>
21- throw("Can't find transaction")
22- }
23- let mess = if ((trtime > time))
24- then ("overtime: " + toString(trtime))
25- else if ((callerAdress != trsender))
26- then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
27- else "prooved"
28-[StringEntry("-", mess)]
15+ let balanceforairdrop = assetBalance(airdrop, token)
16+ let dropamount = 100
17+ let isenough = if ((balanceforairdrop >= dropamount))
18+ then true
19+ else throw("not enough")
20+ if ((isenough == isenough))
21+ then {
22+ let id = fromBase58String(id58)
23+ let callerAdress = Address(i.caller.bytes)
24+ let time = 1639131654752
25+ let trtime = match transferTransactionById(id) {
26+ case ttx: TransferTransaction =>
27+ ttx.timestamp
28+ case _ =>
29+ throw("Can't find transaction")
30+ }
31+ let trsender = match transferTransactionById(id) {
32+ case ttx: TransferTransaction =>
33+ ttx.sender
34+ case _ =>
35+ throw("Can't find transaction")
36+ }
37+ let isprooved = if (if ((trtime > time))
38+ then true
39+ else (callerAdress != trsender))
40+ then false
41+ else true
42+ let mess = if ((trtime > time))
43+ then ("overtime: " + toString(trtime))
44+ else if ((callerAdress != trsender))
45+ then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
46+ else "prooved"
47+ if (isprooved)
48+ then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balanceforairdrop))]
49+ else throw("not prooved")
50+ }
51+ else throw("Strict value is not equal to itself.")
2952 }
3053
3154
3255 @Verifier(tx)
3356 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3457

github/deemru/w8io/026f985 
19.18 ms