tx · ETGREjpTdEuMALhKRFvSsX71DL3HQ9WPqXXudp5HE2Nm
3MyR7tR3rqJJDyvsotfqT1SzuyC2th2GX2g: -0.01000000 Waves
2023.08.07 14:01 [2700086] smart account 3MyR7tR3rqJJDyvsotfqT1SzuyC2th2GX2g > SELF 0.00000000 Waves
{
"type": 13,
"id": "ETGREjpTdEuMALhKRFvSsX71DL3HQ9WPqXXudp5HE2Nm",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1691406148329,
"version": 2,
"chainId": 84,
"sender": "3MyR7tR3rqJJDyvsotfqT1SzuyC2th2GX2g",
"senderPublicKey": "BNhrJZCabKcMuPTo84Uz3QTUH237UCr6Dhe64RkkFxC3",
"proofs": [
"3m5MuR75ft4jPRM1SNSmL2bQPba2uRTFcDGw3T7xVf3vRWeuTTDougMtS95158fBXhc4eDN4nRnSC4hZrickLMTB"
],
"script": "base64:AAIFAAAAAAAAABQIAhIDCgEIEgMKAQgSBgoECAgICAAAAAAAAAADAAAAAWkBAAAAGHJlZ2lzdGVyX3BvbHlnb25fYWRkcmVzcwAAAAEAAAAPUG9seWdvbl9BZGRyZXNzBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAFHJlYWRfZmlyc3RfdHdvX2NoYXJzCQABLwAAAAIFAAAAD1BvbHlnb25fQWRkcmVzcwAAAAAAAAAAAgQAAAAUcmVhZF9hZGRyZXNzX2lmX2V4aXQJAAQiAAAAAQUAAAAPUG9seWdvbl9BZGRyZXNzBAAAABVlbnN1cmVfYWRkcmVzc19wcmVmaXgCAAAAAjB4AwkBAAAAAiE9AAAAAgkAATEAAAABBQAAAA9Qb2x5Z29uX0FkZHJlc3MAAAAAAAAAACoJAAACAAAAAQIAAAB5RW50ZXJlZCBBZGRyZXNzIGxlbmd0aCBpcyBXcm9uZywgQWRkcmVzcyBsZW5ndGggc2hvdWxkIGJlIDQyIGNoYXJzLiBQbGVhc2UgRW50ZXIgY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AAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAEnRvdGFsX2luY29taW5nX3R4bgkAAGQAAAACBQAAABFyZWFkX2luY29taW5nX3R4bgAAAAAAAAAAAQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAATVG90YWxfSW5jb21pbmdfVHhucwUAAAASdG90YWxfaW5jb21pbmdfdHhuCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAABFnZXRfaW5jb21pbmdfaGFzaAkBAAAADXBhcnNlSW50VmFsdWUAAAABBQAAABNnZXRfaW5jb21pbmdfYW1vdW50BQAAAANuaWwAAAABaQEAAAAGRGVsZXRlAAAABAAAAANLZXkAAAAES2V5MQAAAARLZXkyAAAABEtleTMJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADS2V5CQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAABEtleTEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAES2V5MgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAARLZXkzBQAAAANuaWwAAAAAhU9gkw==",
"height": 2700086,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 43pTvML6sqVVfGrgoAnLuGRt69BVMGyJMtfND5HpCwqC
Next: 5PAouPpZz2qdF9QK9UaDSYWzzAhDiUW8d71Qk3rrLLS8
Diff:
Old | New | | Differences |
---|
7 | 7 | | func register_polygon_address (Polygon_Address) = { |
---|
8 | 8 | | let currentKey = toBase58String(i.caller.bytes) |
---|
9 | 9 | | let read_first_two_chars = take(Polygon_Address, 2) |
---|
| 10 | + | let read_address_if_exit = getString(Polygon_Address) |
---|
10 | 11 | | let ensure_address_prefix = "0x" |
---|
11 | 12 | | if ((size(Polygon_Address) != 42)) |
---|
12 | 13 | | then throw("Entered Address length is Wrong, Address length should be 42 chars. Please Enter a valid Polygon Address starts with '0x'") |
---|
13 | 14 | | else if ((read_first_two_chars != ensure_address_prefix)) |
---|
14 | 15 | | then throw("Wrong Polygon Address, Prefix must start with '0x'") |
---|
15 | | - | else [StringEntry(("Polygon_Address_" + currentKey), Polygon_Address)] |
---|
| 16 | + | else if ((read_address_if_exit == Polygon_Address)) |
---|
| 17 | + | then throw("Address already Registered") |
---|
| 18 | + | else [StringEntry(Polygon_Address, currentKey)] |
---|
16 | 19 | | } |
---|
17 | 20 | | |
---|
18 | 21 | | |
---|
19 | 22 | | |
---|
20 | 23 | | @Callable(i) |
---|
21 | 24 | | func post_incoming_polygon_txn (Incoming_Txn) = { |
---|
| 25 | + | let split_incoming_txn = split(Incoming_Txn, "_") |
---|
| 26 | + | let get_incoming_address = split_incoming_txn[0] |
---|
| 27 | + | let get_incoming_hash = split_incoming_txn[1] |
---|
| 28 | + | let get_incoming_amount = split_incoming_txn[2] |
---|
| 29 | + | let check_user_registerd_address = getStringValue(this, get_incoming_address) |
---|
22 | 30 | | let read_incoming_txn = match getInteger(this, "Total_Incoming_Txns") { |
---|
23 | 31 | | case a: Int => |
---|
24 | 32 | | a |
---|
|
26 | 34 | | 0 |
---|
27 | 35 | | } |
---|
28 | 36 | | let total_incoming_txn = (read_incoming_txn + 1) |
---|
29 | | - | let split_incoming_txn = split(Incoming_Txn, "_") |
---|
30 | | - | let get_incoming_address = split_incoming_txn[0] |
---|
31 | | - | [IntegerEntry("Total_Incoming_Txns", total_incoming_txn), StringEntry((toString(total_incoming_txn) + "_Polygon_Incoming_Txn"), Incoming_Txn), StringEntry("Incoming_Address", get_incoming_address)] |
---|
| 37 | + | [IntegerEntry("Total_Incoming_Txns", total_incoming_txn), IntegerEntry(get_incoming_hash, parseIntValue(get_incoming_amount))] |
---|
32 | 38 | | } |
---|
33 | 39 | | |
---|
34 | 40 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func register_polygon_address (Polygon_Address) = { |
---|
8 | 8 | | let currentKey = toBase58String(i.caller.bytes) |
---|
9 | 9 | | let read_first_two_chars = take(Polygon_Address, 2) |
---|
| 10 | + | let read_address_if_exit = getString(Polygon_Address) |
---|
10 | 11 | | let ensure_address_prefix = "0x" |
---|
11 | 12 | | if ((size(Polygon_Address) != 42)) |
---|
12 | 13 | | then throw("Entered Address length is Wrong, Address length should be 42 chars. Please Enter a valid Polygon Address starts with '0x'") |
---|
13 | 14 | | else if ((read_first_two_chars != ensure_address_prefix)) |
---|
14 | 15 | | then throw("Wrong Polygon Address, Prefix must start with '0x'") |
---|
15 | | - | else [StringEntry(("Polygon_Address_" + currentKey), Polygon_Address)] |
---|
| 16 | + | else if ((read_address_if_exit == Polygon_Address)) |
---|
| 17 | + | then throw("Address already Registered") |
---|
| 18 | + | else [StringEntry(Polygon_Address, currentKey)] |
---|
16 | 19 | | } |
---|
17 | 20 | | |
---|
18 | 21 | | |
---|
19 | 22 | | |
---|
20 | 23 | | @Callable(i) |
---|
21 | 24 | | func post_incoming_polygon_txn (Incoming_Txn) = { |
---|
| 25 | + | let split_incoming_txn = split(Incoming_Txn, "_") |
---|
| 26 | + | let get_incoming_address = split_incoming_txn[0] |
---|
| 27 | + | let get_incoming_hash = split_incoming_txn[1] |
---|
| 28 | + | let get_incoming_amount = split_incoming_txn[2] |
---|
| 29 | + | let check_user_registerd_address = getStringValue(this, get_incoming_address) |
---|
22 | 30 | | let read_incoming_txn = match getInteger(this, "Total_Incoming_Txns") { |
---|
23 | 31 | | case a: Int => |
---|
24 | 32 | | a |
---|
25 | 33 | | case _ => |
---|
26 | 34 | | 0 |
---|
27 | 35 | | } |
---|
28 | 36 | | let total_incoming_txn = (read_incoming_txn + 1) |
---|
29 | | - | let split_incoming_txn = split(Incoming_Txn, "_") |
---|
30 | | - | let get_incoming_address = split_incoming_txn[0] |
---|
31 | | - | [IntegerEntry("Total_Incoming_Txns", total_incoming_txn), StringEntry((toString(total_incoming_txn) + "_Polygon_Incoming_Txn"), Incoming_Txn), StringEntry("Incoming_Address", get_incoming_address)] |
---|
| 37 | + | [IntegerEntry("Total_Incoming_Txns", total_incoming_txn), IntegerEntry(get_incoming_hash, parseIntValue(get_incoming_amount))] |
---|
32 | 38 | | } |
---|
33 | 39 | | |
---|
34 | 40 | | |
---|
35 | 41 | | |
---|
36 | 42 | | @Callable(i) |
---|
37 | 43 | | func Delete (Key,Key1,Key2,Key3) = [DeleteEntry(Key), DeleteEntry(Key1), DeleteEntry(Key2), DeleteEntry(Key3)] |
---|
38 | 44 | | |
---|
39 | 45 | | |
---|