tx · GrUywcufiYAEUaibiQUxxD9kjUvzUbYpU8eKJxyMXKWd
3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV: -0.01400000 Waves
2021.12.10 14:19 [1828079] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves
{
"type": 13,
"id": "GrUywcufiYAEUaibiQUxxD9kjUvzUbYpU8eKJxyMXKWd",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1639135260754,
"version": 2,
"chainId": 84,
"sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV",
"senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7",
"proofs": [
"4C8L45FzTYRHhHqy3A39AEfCjm2DcL4rXnXxqZHn666RaZ5BX4XkGB7KATaxq3Yxxm5964hjH7NQDshhQ3WBzwB6"
],
"script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAFdG9rZW4BAAAAIOc5mAuQ0CpHzn2Eeqy2bd/5bxix/Zvv2ghyN3nN6l5mAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUvl8ZsNRuQjR8RHdkDfsNYL0aRkcYXOeKAAAAAQAAAAFpAQAAAARjYWxsAAAAAQAAAARpZDU4BAAAAAdiYWxhbmNlCQAD8AAAAAIFAAAAB2FpcmRyb3AFAAAABXRva2VuBAAAAApkcm9wYW1vdW50AAAAAAAAD0JBBAAAAAhpc2Vub3VnaAMJAABmAAAAAgUAAAAHYmFsYW5jZQUAAAAKZHJvcGFtb3VudAYJAAACAAAAAQIAAAAKbm90IGVub3VnaAMJAAAAAAAAAgUAAAAIaXNlbm91Z2gFAAAACGlzZW5vdWdoBAAAAAJpZAkAAlkAAAABBQAAAARpZDU4BAAAAAxjYWxsZXJBZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEdGltZQAAAAF9o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2UFAAAAA25pbAkAAAIAAAABAgAAAAtub3QgcHJvb3ZlZAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVdl9Hg=",
"height": 1828079,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BeKmQmR5fjjjy47jjyKmBauY4MkAd4zFd4oXVLagEnZ1
Next: CPHhfneoWM4KouQ85JUERQQ6waSXhBgC3vuKknUAGj8m
Diff:
Old | New | | Differences |
---|
6 | 6 | | let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV') |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func start () = [IntegerEntry("balanceforairdrop", 1000000)] |
---|
10 | | - | |
---|
11 | | - | |
---|
12 | | - | |
---|
13 | | - | @Callable(i) |
---|
14 | 9 | | func call (id58) = { |
---|
15 | | - | let balanceforairdrop = assetBalance(airdrop, token) |
---|
| 10 | + | let balance = assetBalance(airdrop, token) |
---|
16 | 11 | | let dropamount = 1000001 |
---|
17 | | - | let isenough = if ((balanceforairdrop >= dropamount)) |
---|
| 12 | + | let isenough = if ((balance > dropamount)) |
---|
18 | 13 | | then true |
---|
19 | 14 | | else throw("not enough") |
---|
20 | 15 | | if ((isenough == isenough)) |
---|
|
45 | 40 | | then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender)) |
---|
46 | 41 | | else "prooved" |
---|
47 | 42 | | if (isprooved) |
---|
48 | | - | then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balanceforairdrop))] |
---|
| 43 | + | then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balance))] |
---|
49 | 44 | | else throw("not prooved") |
---|
50 | 45 | | } |
---|
51 | 46 | | else throw("Strict value is not equal to itself.") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let token = base58'GZc7eKnq2KJwqetRmUzSqr2ZaCGseDZufSocz83sUNoo' |
---|
5 | 5 | | |
---|
6 | 6 | | let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV') |
---|
7 | 7 | | |
---|
8 | 8 | | @Callable(i) |
---|
9 | | - | func start () = [IntegerEntry("balanceforairdrop", 1000000)] |
---|
10 | | - | |
---|
11 | | - | |
---|
12 | | - | |
---|
13 | | - | @Callable(i) |
---|
14 | 9 | | func call (id58) = { |
---|
15 | | - | let balanceforairdrop = assetBalance(airdrop, token) |
---|
| 10 | + | let balance = assetBalance(airdrop, token) |
---|
16 | 11 | | let dropamount = 1000001 |
---|
17 | | - | let isenough = if ((balanceforairdrop >= dropamount)) |
---|
| 12 | + | let isenough = if ((balance > dropamount)) |
---|
18 | 13 | | then true |
---|
19 | 14 | | else throw("not enough") |
---|
20 | 15 | | if ((isenough == isenough)) |
---|
21 | 16 | | then { |
---|
22 | 17 | | let id = fromBase58String(id58) |
---|
23 | 18 | | let callerAdress = Address(i.caller.bytes) |
---|
24 | 19 | | let time = 1639131654752 |
---|
25 | 20 | | let trtime = match transferTransactionById(id) { |
---|
26 | 21 | | case ttx: TransferTransaction => |
---|
27 | 22 | | ttx.timestamp |
---|
28 | 23 | | case _ => |
---|
29 | 24 | | throw("Can't find transaction") |
---|
30 | 25 | | } |
---|
31 | 26 | | let trsender = match transferTransactionById(id) { |
---|
32 | 27 | | case ttx: TransferTransaction => |
---|
33 | 28 | | ttx.sender |
---|
34 | 29 | | case _ => |
---|
35 | 30 | | throw("Can't find transaction") |
---|
36 | 31 | | } |
---|
37 | 32 | | let isprooved = if (if ((trtime > time)) |
---|
38 | 33 | | then true |
---|
39 | 34 | | else (callerAdress != trsender)) |
---|
40 | 35 | | then false |
---|
41 | 36 | | else true |
---|
42 | 37 | | let mess = if ((trtime > time)) |
---|
43 | 38 | | then ("overtime: " + toString(trtime)) |
---|
44 | 39 | | else if ((callerAdress != trsender)) |
---|
45 | 40 | | then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender)) |
---|
46 | 41 | | else "prooved" |
---|
47 | 42 | | if (isprooved) |
---|
48 | | - | then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balanceforairdrop))] |
---|
| 43 | + | then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balance))] |
---|
49 | 44 | | else throw("not prooved") |
---|
50 | 45 | | } |
---|
51 | 46 | | else throw("Strict value is not equal to itself.") |
---|
52 | 47 | | } |
---|
53 | 48 | | |
---|
54 | 49 | | |
---|
55 | 50 | | @Verifier(tx) |
---|
56 | 51 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
57 | 52 | | |
---|