tx · 7GGXH3syx5ANdEU857ZrWNcyTJzF3Viqdk7vEPpxNnk9
3N7NSGttZdtSoZanmmvFbtbKy81aH3qmCr1: -0.01000000 Waves
2022.10.26 16:27 [2289448] smart account 3N7NSGttZdtSoZanmmvFbtbKy81aH3qmCr1 > SELF 0.00000000 Waves
{
"type": 13,
"id": "7GGXH3syx5ANdEU857ZrWNcyTJzF3Viqdk7vEPpxNnk9",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1666790906566,
"version": 2,
"chainId": 84,
"sender": "3N7NSGttZdtSoZanmmvFbtbKy81aH3qmCr1",
"senderPublicKey": "DnHWpL2JmrKWWVJgbwq4czBSA7NpfK3MyfsKzKLJbcro",
"proofs": [
"4xt7G5gexBjfXcXLan3V2fMEo3b3EcVQe6e82ej36y5jKZFzN5y8GnoAZF2eS5Vy2wiDc36ZWDiVEv3vyYmngqCe"
],
"script": "base64:AAIFAAAAAAAAABYIAhIFCgMICAESBAoCCAISAwoBCBIAAAAADwEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAADENhbid0IHJlYWQgJwUAAAADa2V5AgAAAA0nIGF0IGFkZHJlc3MgCQAEJQAAAAEFAAAAB2FkZHJlc3MBAAAAEWdldEludGVnZXJPclRocm93AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAMQ2FuJ3QgcmVhZCAnBQAAAANrZXkCAAAADScgYXQgYWRkcmVzcyAJAAQlAAAAAQUAAAAHYWRkcmVzcwEAAAATcGFyc2VBZGRyZXNzT3JUaHJvdwAAAAEAAA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WVPckVycm9yTWVzc2FnZQAAAAIJAAPsAAAAAQUAAAAHYXNzZXRJZAIAAAANSW52YWxpZCBhc3NldAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAGYW1vdW50AAAAAAAAAAABCQAAAgAAAAECAAAAGUluY29ycmVjdCBhbW91bnQgb2YgYXNzZXQDCQEAAAAFaXNORlQAAAABBQAAAAVhc3NldAkAAAIAAAABAgAAABtBc3NldCBpbiBwYXltZW50IGlzIG5vdCBORlQEAAAACHRva2VuU3RyCQEAAAAQZ2V0U3RyaW5nT3JUaHJvdwAAAAIFAAAACXJlZ2lzdHJhcgkBAAAADmtleV9OYW1lX3Rva2VuAAAAAQgFAAAABWFzc2V0AAAABG5hbWUEAAAABXRva2VuCQABmwAAAAEFAAAACHRva2VuU3RyBAAAAAh0cmFuc2ZlcgkBAAAADG1ha2VUcmFuc2ZlcgAAAAIFAAAABmNhbGxlcgUAAAAFdG9rZW4DCQAAAAAAAAIFAAAACHRyYW5zZmVyBQAAAAh0cmFuc2ZlcgQAAAAMcmVnaXN0cmF0aW9uCQAD/AAAAAQFAAAACXJlZ2lzdHJhcgIAAAAHcmVjbGFpbQkABEwAAAACCAUAAAAFYXNzZXQAAAAEbmFtZQUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAADHJlZ2lzdHJhdGlvbgUAAAAMcmVnaXN0cmF0aW9uBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAADCfXd",
"height": 2289448,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9k6Jx3Mi3YAZojXPtdhRdHGmRFrsjBcVZBo9H9rH8emE
Next: HFz1cVTuPoARbUvRmhmZuSxWvz5e6xCWwY6GSwUC4qkz
Diff:
Old | New | | Differences |
---|
10 | 10 | | func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'")) |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | | - | func key_reissued (name) = ("Reissued_" + name) |
---|
| 13 | + | func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property) |
---|
| 14 | + | |
---|
| 15 | + | |
---|
| 16 | + | func key_Name_token (name) = key_entity("Name", name, "token") |
---|
14 | 17 | | |
---|
15 | 18 | | |
---|
16 | 19 | | let key_meedusAddress = "meedusAddress" |
---|
|
29 | 32 | | |
---|
30 | 33 | | let meedusInitTimestamp = getIntegerOrThrow(this, key_meedusInitTimestamp) |
---|
31 | 34 | | |
---|
| 35 | + | func isNFT (asset) = if (if (if ((asset.quantity != 1)) |
---|
| 36 | + | then true |
---|
| 37 | + | else (asset.issuer != meedus)) |
---|
| 38 | + | then true |
---|
| 39 | + | else (asset.decimals != 0)) |
---|
| 40 | + | then true |
---|
| 41 | + | else (asset.reissuable != false) |
---|
| 42 | + | |
---|
| 43 | + | |
---|
| 44 | + | func makeTransfer (address,asset) = match invoke(this, "transfer", [address, asset], nil) { |
---|
| 45 | + | case b: Boolean => |
---|
| 46 | + | b |
---|
| 47 | + | case _ => |
---|
| 48 | + | throw("Invalid result for transfer") |
---|
| 49 | + | } |
---|
| 50 | + | |
---|
| 51 | + | |
---|
32 | 52 | | @Callable(inv) |
---|
33 | 53 | | func init (meedusAddress,registrarAddress,meedusInitTimestamp) = [StringEntry(key_meedusAddress, meedusAddress), StringEntry(key_registrarAddress, registrarAddress), IntegerEntry(key_meedusInitTimestamp, meedusInitTimestamp)] |
---|
| 54 | + | |
---|
| 55 | + | |
---|
| 56 | + | |
---|
| 57 | + | @Callable(inv) |
---|
| 58 | + | func transfer (addressStr,asset) = { |
---|
| 59 | + | let address = parseAddressOrThrow(addressStr) |
---|
| 60 | + | $Tuple2([ScriptTransfer(address, 1, asset)], true) |
---|
| 61 | + | } |
---|
| 62 | + | |
---|
| 63 | + | |
---|
| 64 | + | |
---|
| 65 | + | @Callable(inv) |
---|
| 66 | + | func reserve (name) = { |
---|
| 67 | + | let caller = inv.caller |
---|
| 68 | + | let callerStr = toString(caller) |
---|
| 69 | + | if ((this != caller)) |
---|
| 70 | + | then throw("Only self call are allowed") |
---|
| 71 | + | else { |
---|
| 72 | + | let reservation = invoke(registrar, "register", [name, callerStr, meedusInitTimestamp], nil) |
---|
| 73 | + | if ((reservation == reservation)) |
---|
| 74 | + | then nil |
---|
| 75 | + | else throw("Strict value is not equal to itself.") |
---|
| 76 | + | } |
---|
| 77 | + | } |
---|
34 | 78 | | |
---|
35 | 79 | | |
---|
36 | 80 | | |
---|
|
43 | 87 | | let asset = valueOrErrorMessage(assetInfo(assetId), "Invalid asset") |
---|
44 | 88 | | if ((pmt.amount != 1)) |
---|
45 | 89 | | then throw("Incorrect amount of asset") |
---|
46 | | - | else if (if (if (if ((asset.quantity != 1)) |
---|
47 | | - | then true |
---|
48 | | - | else (asset.issuer != meedus)) |
---|
49 | | - | then true |
---|
50 | | - | else (asset.decimals != 0)) |
---|
51 | | - | then true |
---|
52 | | - | else (asset.reissuable == true)) |
---|
| 90 | + | else if (isNFT(asset)) |
---|
53 | 91 | | then throw("Asset in payment is not NFT") |
---|
54 | 92 | | else { |
---|
55 | | - | let registration = invoke(registrar, "register", [asset.name, callerStr, meedusInitTimestamp], nil) |
---|
56 | | - | if ((registration == registration)) |
---|
57 | | - | then nil |
---|
| 93 | + | let tokenStr = getStringOrThrow(registrar, key_Name_token(asset.name)) |
---|
| 94 | + | let token = toBytes(tokenStr) |
---|
| 95 | + | let transfer = makeTransfer(caller, token) |
---|
| 96 | + | if ((transfer == transfer)) |
---|
| 97 | + | then { |
---|
| 98 | + | let registration = invoke(registrar, "reclaim", [asset.name], nil) |
---|
| 99 | + | if ((registration == registration)) |
---|
| 100 | + | then nil |
---|
| 101 | + | else throw("Strict value is not equal to itself.") |
---|
| 102 | + | } |
---|
58 | 103 | | else throw("Strict value is not equal to itself.") |
---|
59 | 104 | | } |
---|
60 | | - | } |
---|
61 | | - | |
---|
62 | | - | |
---|
63 | | - | |
---|
64 | | - | @Callable(inv) |
---|
65 | | - | func reserve (name) = { |
---|
66 | | - | let caller = inv.caller |
---|
67 | | - | if ((this != caller)) |
---|
68 | | - | then throw("Only self call are allowed") |
---|
69 | | - | else { |
---|
70 | | - | let reservation = invoke(registrar, "addReserve", [name], nil) |
---|
71 | | - | if ((reservation == reservation)) |
---|
72 | | - | then nil |
---|
73 | | - | else throw("Strict value is not equal to itself.") |
---|
74 | | - | } |
---|
75 | 105 | | } |
---|
76 | 106 | | |
---|
77 | 107 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func getStringOrThrow (address,key) = valueOrErrorMessage(getString(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | func getIntegerOrThrow (address,key) = valueOrErrorMessage(getInteger(address, key), ((("Can't read '" + key) + "' at address ") + toString(address))) |
---|
8 | 8 | | |
---|
9 | 9 | | |
---|
10 | 10 | | func parseAddressOrThrow (maybeAddress) = valueOrErrorMessage(addressFromString(maybeAddress), (("Can't parse address from '" + maybeAddress) + "'")) |
---|
11 | 11 | | |
---|
12 | 12 | | |
---|
13 | | - | func key_reissued (name) = ("Reissued_" + name) |
---|
| 13 | + | func key_entity (name,pk,property) = ((((name + "_") + pk) + "_") + property) |
---|
| 14 | + | |
---|
| 15 | + | |
---|
| 16 | + | func key_Name_token (name) = key_entity("Name", name, "token") |
---|
14 | 17 | | |
---|
15 | 18 | | |
---|
16 | 19 | | let key_meedusAddress = "meedusAddress" |
---|
17 | 20 | | |
---|
18 | 21 | | let key_registrarAddress = "registrarAddress" |
---|
19 | 22 | | |
---|
20 | 23 | | let key_meedusInitTimestamp = "meedusInitTimestamp" |
---|
21 | 24 | | |
---|
22 | 25 | | let meedusAddress = getStringOrThrow(this, key_meedusAddress) |
---|
23 | 26 | | |
---|
24 | 27 | | let meedus = parseAddressOrThrow(meedusAddress) |
---|
25 | 28 | | |
---|
26 | 29 | | let registrarAddress = getStringOrThrow(this, key_registrarAddress) |
---|
27 | 30 | | |
---|
28 | 31 | | let registrar = parseAddressOrThrow(registrarAddress) |
---|
29 | 32 | | |
---|
30 | 33 | | let meedusInitTimestamp = getIntegerOrThrow(this, key_meedusInitTimestamp) |
---|
31 | 34 | | |
---|
| 35 | + | func isNFT (asset) = if (if (if ((asset.quantity != 1)) |
---|
| 36 | + | then true |
---|
| 37 | + | else (asset.issuer != meedus)) |
---|
| 38 | + | then true |
---|
| 39 | + | else (asset.decimals != 0)) |
---|
| 40 | + | then true |
---|
| 41 | + | else (asset.reissuable != false) |
---|
| 42 | + | |
---|
| 43 | + | |
---|
| 44 | + | func makeTransfer (address,asset) = match invoke(this, "transfer", [address, asset], nil) { |
---|
| 45 | + | case b: Boolean => |
---|
| 46 | + | b |
---|
| 47 | + | case _ => |
---|
| 48 | + | throw("Invalid result for transfer") |
---|
| 49 | + | } |
---|
| 50 | + | |
---|
| 51 | + | |
---|
32 | 52 | | @Callable(inv) |
---|
33 | 53 | | func init (meedusAddress,registrarAddress,meedusInitTimestamp) = [StringEntry(key_meedusAddress, meedusAddress), StringEntry(key_registrarAddress, registrarAddress), IntegerEntry(key_meedusInitTimestamp, meedusInitTimestamp)] |
---|
| 54 | + | |
---|
| 55 | + | |
---|
| 56 | + | |
---|
| 57 | + | @Callable(inv) |
---|
| 58 | + | func transfer (addressStr,asset) = { |
---|
| 59 | + | let address = parseAddressOrThrow(addressStr) |
---|
| 60 | + | $Tuple2([ScriptTransfer(address, 1, asset)], true) |
---|
| 61 | + | } |
---|
| 62 | + | |
---|
| 63 | + | |
---|
| 64 | + | |
---|
| 65 | + | @Callable(inv) |
---|
| 66 | + | func reserve (name) = { |
---|
| 67 | + | let caller = inv.caller |
---|
| 68 | + | let callerStr = toString(caller) |
---|
| 69 | + | if ((this != caller)) |
---|
| 70 | + | then throw("Only self call are allowed") |
---|
| 71 | + | else { |
---|
| 72 | + | let reservation = invoke(registrar, "register", [name, callerStr, meedusInitTimestamp], nil) |
---|
| 73 | + | if ((reservation == reservation)) |
---|
| 74 | + | then nil |
---|
| 75 | + | else throw("Strict value is not equal to itself.") |
---|
| 76 | + | } |
---|
| 77 | + | } |
---|
34 | 78 | | |
---|
35 | 79 | | |
---|
36 | 80 | | |
---|
37 | 81 | | @Callable(inv) |
---|
38 | 82 | | func exchange () = { |
---|
39 | 83 | | let caller = inv.caller |
---|
40 | 84 | | let callerStr = toString(caller) |
---|
41 | 85 | | let pmt = inv.payments[0] |
---|
42 | 86 | | let assetId = valueOrErrorMessage(pmt.assetId, "Asset cannot be WAVES") |
---|
43 | 87 | | let asset = valueOrErrorMessage(assetInfo(assetId), "Invalid asset") |
---|
44 | 88 | | if ((pmt.amount != 1)) |
---|
45 | 89 | | then throw("Incorrect amount of asset") |
---|
46 | | - | else if (if (if (if ((asset.quantity != 1)) |
---|
47 | | - | then true |
---|
48 | | - | else (asset.issuer != meedus)) |
---|
49 | | - | then true |
---|
50 | | - | else (asset.decimals != 0)) |
---|
51 | | - | then true |
---|
52 | | - | else (asset.reissuable == true)) |
---|
| 90 | + | else if (isNFT(asset)) |
---|
53 | 91 | | then throw("Asset in payment is not NFT") |
---|
54 | 92 | | else { |
---|
55 | | - | let registration = invoke(registrar, "register", [asset.name, callerStr, meedusInitTimestamp], nil) |
---|
56 | | - | if ((registration == registration)) |
---|
57 | | - | then nil |
---|
| 93 | + | let tokenStr = getStringOrThrow(registrar, key_Name_token(asset.name)) |
---|
| 94 | + | let token = toBytes(tokenStr) |
---|
| 95 | + | let transfer = makeTransfer(caller, token) |
---|
| 96 | + | if ((transfer == transfer)) |
---|
| 97 | + | then { |
---|
| 98 | + | let registration = invoke(registrar, "reclaim", [asset.name], nil) |
---|
| 99 | + | if ((registration == registration)) |
---|
| 100 | + | then nil |
---|
| 101 | + | else throw("Strict value is not equal to itself.") |
---|
| 102 | + | } |
---|
58 | 103 | | else throw("Strict value is not equal to itself.") |
---|
59 | 104 | | } |
---|
60 | | - | } |
---|
61 | | - | |
---|
62 | | - | |
---|
63 | | - | |
---|
64 | | - | @Callable(inv) |
---|
65 | | - | func reserve (name) = { |
---|
66 | | - | let caller = inv.caller |
---|
67 | | - | if ((this != caller)) |
---|
68 | | - | then throw("Only self call are allowed") |
---|
69 | | - | else { |
---|
70 | | - | let reservation = invoke(registrar, "addReserve", [name], nil) |
---|
71 | | - | if ((reservation == reservation)) |
---|
72 | | - | then nil |
---|
73 | | - | else throw("Strict value is not equal to itself.") |
---|
74 | | - | } |
---|
75 | 105 | | } |
---|
76 | 106 | | |
---|
77 | 107 | | |
---|