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:
OldNewDifferences
44 let contractFileName = "p1"
55
66 let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD')
7+
8+let PRACTICE_token = base58'ETjui5BwgM7t2anpXm9A2pY3WzHpaxK8FWRPhw4Bo1GX'
79
810 let SEP = " "
911
2931 let payment_amount = i.payments[0].amount
3032 if ((payment_amount != wordCount))
3133 then throwErr("Кол-во слов != кол-ву токенов")
32- else if ((base58'67jd6w7KdYT8s2sPCfkP7B3jMoXXeSnM9UjwtvBPp19yQ' == i.payments[0].assetId))
34+ else if ((PRACTICE_token == i.payments[0].assetId))
3335 then throwErr("Платеж должен быть в PRACTICE")
3436 else [StringEntry(keyMsg(), msg)]
3537 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFileName = "p1"
55
66 let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD')
7+
8+let PRACTICE_token = base58'ETjui5BwgM7t2anpXm9A2pY3WzHpaxK8FWRPhw4Bo1GX'
79
810 let SEP = " "
911
1012 let kassetId = "AssetID"
1113
1214 func keyMsg () = makeString(["%s", "Переданное сообщение: "], SEP)
1315
1416
1517 func keyAssetID () = makeString(["%s", "assetID"], SEP)
1618
1719
1820 func wrapErr (msg) = makeString([contractFileName, ":", msg], "")
1921
2022
2123 func throwErr (msg) = throw(wrapErr(msg))
2224
2325
2426 @Callable(i)
2527 func message (msg) = {
2628 let words = split(msg, SEP)
2729 let wordCount = size(words)
2830 let payment = i.payments[0]
2931 let payment_amount = i.payments[0].amount
3032 if ((payment_amount != wordCount))
3133 then throwErr("Кол-во слов != кол-ву токенов")
32- else if ((base58'67jd6w7KdYT8s2sPCfkP7B3jMoXXeSnM9UjwtvBPp19yQ' == i.payments[0].assetId))
34+ else if ((PRACTICE_token == i.payments[0].assetId))
3335 then throwErr("Платеж должен быть в PRACTICE")
3436 else [StringEntry(keyMsg(), msg)]
3537 }
3638
3739
3840 @Verifier(tx)
3941 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4042

github/deemru/w8io/026f985 
37.28 ms