tx · 5avNfTaSLz4hoH2b5i5VwUahtswYMPWve5kvtthMeu1a
3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5: -0.01000000 Waves
2023.09.15 09:57 [2756184] smart account 3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5 > SELF 0.00000000 Waves
{
"type": 13,
"id": "5avNfTaSLz4hoH2b5i5VwUahtswYMPWve5kvtthMeu1a",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1694761123015,
"version": 2,
"chainId": 84,
"sender": "3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5",
"senderPublicKey": "2LmNyaN5YAXdg9C5vsXcTLU66hsW2KUNPsN7KcHBYhUo",
"proofs": [
"4YH1bwM8uJcAX6spQg8Fh8s6c5hVGoZs9Bu2o46PmK59EQzT3r9gdkCD28zz2LiwZvvQmHJDtgag1EbQkH7f3qBH"
],
"script": "base64:BgIICAISBAoCCAgBAQxnZXRhc3NldGluZm8BB2Fzc2V0SWQEByRtYXRjaDAFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF0BQckbWF0Y2gwCQDsBwEJANkEAQUHYXNzZXRJZAkAAgECEENhbid0IGZpbmQgYXNzZXQBAWkBFVJlZ2lzdGVyUGFpckZvclZvdGluZwIMRW50ZXJBc3NldElEB2Fzc2V0SWQEDXJlYWRhc3NldGluZm8JAQxnZXRhc3NldGluZm8BBQdhc3NldElkBARwbXQxCQEFdmFsdWUBCQCRAwIIBQFpCHBheW1lbnRzAAAECmN1cnJlbnRLZXkJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQJZmV0Y2hwYWlyCQCdCAIFBHRoaXMJAKwCAgIIUGFpcl9VVl8FDEVudGVyQXNzZXRJRAQNYXNzZXRpbmZvcG10MgkA2QQBBQxFbnRlckFzc2V0SUQDCQAAAgUJZmV0Y2hwYWlyBQxFbnRlckFzc2V0SUQJAAIBAiJQYWlyIEFscmVhZHkgRXhpc3QgaW4gVm90aW5nIExpc3QuCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgIIUGFpcl9VVl8FDEVudGVyQXNzZXRJRAUMRW50ZXJBc3NldElEBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5aFbbcA==",
"height": 2756184,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: DGwFS22yifjc3wdA3HVJ3Vw8ZgCZRxb7PofGDRc7FBka
Next: HJwDi9yhfHg2doKUu1CTsUWSqg9RPoqAgaHGFVqNxGdK
Diff:
Old | New | | Differences |
---|
13 | 13 | | func RegisterPairForVoting (EnterAssetID,assetId) = { |
---|
14 | 14 | | let readassetinfo = getassetinfo(assetId) |
---|
15 | 15 | | let pmt1 = value(i.payments[0]) |
---|
16 | | - | let pmt2 = value(i.payments[1]) |
---|
17 | 16 | | let currentKey = toBase58String(i.caller.bytes) |
---|
18 | | - | let TN = !(isDefined(pmt2.assetId)) |
---|
19 | 17 | | let fetchpair = getString(this, ("Pair_UV_" + EnterAssetID)) |
---|
20 | 18 | | let assetinfopmt2 = fromBase58String(EnterAssetID) |
---|
21 | 19 | | if ((fetchpair == EnterAssetID)) |
---|
22 | 20 | | then throw("Pair Already Exist in Voting List.") |
---|
23 | | - | else if ((size(i.payments) != 2)) |
---|
24 | | - | then throw("Two attached assets expected as payment. Kindly Attach payment1 = CODE Token & payment2 = Token you want to List for Voting.") |
---|
25 | | - | else if ((pmt2.assetId != assetinfopmt2)) |
---|
26 | | - | then throw("Input String & Attached AssetID in payment2 is not matching.") |
---|
27 | | - | else if ((TN == true)) |
---|
28 | | - | then throw("You Attached TN Asset ID for Voting, please attach fsTN instead of TN or Token You want to list in payment[2].") |
---|
29 | | - | else [StringEntry(("Pair_UV_" + EnterAssetID), EnterAssetID)] |
---|
| 21 | + | else [StringEntry(("Pair_UV_" + EnterAssetID), EnterAssetID)] |
---|
30 | 22 | | } |
---|
31 | 23 | | |
---|
32 | 24 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getassetinfo (assetId) = match assetId { |
---|
5 | 5 | | case t: String => |
---|
6 | 6 | | assetInfo(fromBase58String(assetId)) |
---|
7 | 7 | | case _ => |
---|
8 | 8 | | throw("Can't find asset") |
---|
9 | 9 | | } |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | @Callable(i) |
---|
13 | 13 | | func RegisterPairForVoting (EnterAssetID,assetId) = { |
---|
14 | 14 | | let readassetinfo = getassetinfo(assetId) |
---|
15 | 15 | | let pmt1 = value(i.payments[0]) |
---|
16 | | - | let pmt2 = value(i.payments[1]) |
---|
17 | 16 | | let currentKey = toBase58String(i.caller.bytes) |
---|
18 | | - | let TN = !(isDefined(pmt2.assetId)) |
---|
19 | 17 | | let fetchpair = getString(this, ("Pair_UV_" + EnterAssetID)) |
---|
20 | 18 | | let assetinfopmt2 = fromBase58String(EnterAssetID) |
---|
21 | 19 | | if ((fetchpair == EnterAssetID)) |
---|
22 | 20 | | then throw("Pair Already Exist in Voting List.") |
---|
23 | | - | else if ((size(i.payments) != 2)) |
---|
24 | | - | then throw("Two attached assets expected as payment. Kindly Attach payment1 = CODE Token & payment2 = Token you want to List for Voting.") |
---|
25 | | - | else if ((pmt2.assetId != assetinfopmt2)) |
---|
26 | | - | then throw("Input String & Attached AssetID in payment2 is not matching.") |
---|
27 | | - | else if ((TN == true)) |
---|
28 | | - | then throw("You Attached TN Asset ID for Voting, please attach fsTN instead of TN or Token You want to list in payment[2].") |
---|
29 | | - | else [StringEntry(("Pair_UV_" + EnterAssetID), EnterAssetID)] |
---|
| 21 | + | else [StringEntry(("Pair_UV_" + EnterAssetID), EnterAssetID)] |
---|
30 | 22 | | } |
---|
31 | 23 | | |
---|
32 | 24 | | |
---|
33 | 25 | | @Verifier(tx) |
---|
34 | 26 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
35 | 27 | | |
---|