tx · 9NpQXs6VfKqupPzdF43QYExgBqCdnFMLkmbqNd5s1okb
3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD: -0.01000000 Waves
2023.08.19 19:18 [2717716] smart account 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD > SELF 0.00000000 Waves
{
"type": 13,
"id": "9NpQXs6VfKqupPzdF43QYExgBqCdnFMLkmbqNd5s1okb",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1692461946352,
"version": 2,
"chainId": 84,
"sender": "3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD",
"senderPublicKey": "G6PnkMn8MpXBkNwsQKMn1o1V7EKMgZyHCJRdFMQuouBC",
"proofs": [
"5nzKZMmUZMKPFGejnwFy5ACVJLaPSVRUuasg6BGQsqx9w18fVPvMXeTuWjktKNqTsMjs775UMoh5Kih1VsN9FZdP"
],
"script": "base64:BgIHCAISAwoBCAkAEGNvbnRyYWN0RmlsZU5hbWUCAnAxAA10b2tlbl9hZGRyZXNzCQEHQWRkcmVzcwEBGgFUUevquKc82yLj6POP0d8MGx4c9yM7LkYsAA5QUkFDVElDRV90b2tlbgEgyAGMVNNzbR4ddGb1+Br1TR/yHLDHoaMTRmv6PHOTCbQAA1NFUAIBIAAIa2Fzc2V0SWQCB0Fzc2V0SUQBBmtleU1zZwAJALkJAgkAzAgCAgIlcwkAzAgCAinQn9C10YDQtdC00LDQvdC90L7QtSDRgdC+0L7QsdGJ0LXQvdC40LU6IAUDbmlsBQNTRVABCmtleUFzc2V0SUQACQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJRAUDbmlsBQNTRVABB3dyYXBFcnIBA21zZwkAuQkCCQDMCAIFEGNvbnRyYWN0RmlsZU5hbWUJAMwIAgIBOgkAzAgCBQNtc2cFA25pbAIAAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cBAWkBB21lc3NhZ2UBA21zZwQFd29yZHMJALUJAgUDbXNnBQNTRVAECXdvcmRDb3VudAkAkAMBBQV3b3JkcwQHcGF5bWVudAkAkQMCCAUBaQhwYXltZW50cwAABA5wYXltZW50X2Ftb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQDCQECIT0CBQ5wYXltZW50X2Ftb3VudAUJd29yZENvdW50CQEIdGhyb3dFcnIBAjLQmtC+0Lst0LLQviDRgdC70L7QsiAhPSDQutC+0Lst0LLRgyDRgtC+0LrQtdC90L7QsgMJAAACBQ5QUkFDVElDRV90b2tlbggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkCQEIdGhyb3dFcnIBAi7Qn9C70LDRgtC10LYg0LTQvtC70LbQtdC9INCx0YvRgtGMINCyIFBSQUNUSUNFCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQZrZXlNc2cABQNtc2cFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXn6XdP0",
"height": 2717716,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: H6oRCa1f4g9FNwMekmVMi7GwJJKWu9keasgyhNTwybRL
Next: Hk1QunLJEYNrAe7ZSQdb9EPHa25Y4VVhGYvHxLmZzzPw
Diff:
Old | New | | Differences |
---|
4 | 4 | | let contractFileName = "p1" |
---|
5 | 5 | | |
---|
6 | 6 | | let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD') |
---|
| 7 | + | |
---|
| 8 | + | let PRACTICE_token = base58'ETjui5BwgM7t2anpXm9A2pY3WzHpaxK8FWRPhw4Bo1GX' |
---|
7 | 9 | | |
---|
8 | 10 | | let SEP = " " |
---|
9 | 11 | | |
---|
|
29 | 31 | | let payment_amount = i.payments[0].amount |
---|
30 | 32 | | if ((payment_amount != wordCount)) |
---|
31 | 33 | | then throwErr("Кол-во слов != кол-ву токенов") |
---|
32 | | - | else if ((base58'67jd6w7KdYT8s2sPCfkP7B3jMoXXeSnM9UjwtvBPp19yQ' == i.payments[0].assetId)) |
---|
| 34 | + | else if ((PRACTICE_token == i.payments[0].assetId)) |
---|
33 | 35 | | then throwErr("Платеж должен быть в PRACTICE") |
---|
34 | 36 | | else [StringEntry(keyMsg(), msg)] |
---|
35 | 37 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let contractFileName = "p1" |
---|
5 | 5 | | |
---|
6 | 6 | | let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD') |
---|
| 7 | + | |
---|
| 8 | + | let PRACTICE_token = base58'ETjui5BwgM7t2anpXm9A2pY3WzHpaxK8FWRPhw4Bo1GX' |
---|
7 | 9 | | |
---|
8 | 10 | | let SEP = " " |
---|
9 | 11 | | |
---|
10 | 12 | | let kassetId = "AssetID" |
---|
11 | 13 | | |
---|
12 | 14 | | func keyMsg () = makeString(["%s", "Переданное сообщение: "], SEP) |
---|
13 | 15 | | |
---|
14 | 16 | | |
---|
15 | 17 | | func keyAssetID () = makeString(["%s", "assetID"], SEP) |
---|
16 | 18 | | |
---|
17 | 19 | | |
---|
18 | 20 | | func wrapErr (msg) = makeString([contractFileName, ":", msg], "") |
---|
19 | 21 | | |
---|
20 | 22 | | |
---|
21 | 23 | | func throwErr (msg) = throw(wrapErr(msg)) |
---|
22 | 24 | | |
---|
23 | 25 | | |
---|
24 | 26 | | @Callable(i) |
---|
25 | 27 | | func message (msg) = { |
---|
26 | 28 | | let words = split(msg, SEP) |
---|
27 | 29 | | let wordCount = size(words) |
---|
28 | 30 | | let payment = i.payments[0] |
---|
29 | 31 | | let payment_amount = i.payments[0].amount |
---|
30 | 32 | | if ((payment_amount != wordCount)) |
---|
31 | 33 | | then throwErr("Кол-во слов != кол-ву токенов") |
---|
32 | | - | else if ((base58'67jd6w7KdYT8s2sPCfkP7B3jMoXXeSnM9UjwtvBPp19yQ' == i.payments[0].assetId)) |
---|
| 34 | + | else if ((PRACTICE_token == i.payments[0].assetId)) |
---|
33 | 35 | | then throwErr("Платеж должен быть в PRACTICE") |
---|
34 | 36 | | else [StringEntry(keyMsg(), msg)] |
---|
35 | 37 | | } |
---|
36 | 38 | | |
---|
37 | 39 | | |
---|
38 | 40 | | @Verifier(tx) |
---|
39 | 41 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
40 | 42 | | |
---|