tx · gUhQ2MtLnZHa1rEKZRZgBaP6Ai5sVC6rTVKdkkwpfMo

3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F:  -0.01000000 Waves

2022.12.20 14:35 [2368554] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves

{ "type": 13, "id": "gUhQ2MtLnZHa1rEKZRZgBaP6Ai5sVC6rTVKdkkwpfMo", "fee": 1000000, "feeAssetId": null, "timestamp": 1671536112347, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "EMS8bETvNVCEV1986r9drf3Hbiqn8ZABhZeyGCC1MhodqkdLsKPnPXeqxf6dHLABdyd2VtmKYgE2S1JnbxyTFKL" ], "script": "base64:BgILCAISABIDCgEIEgAAAwFpAQh3aXRoZHJhdwAEBmNhbGxlcggIBQFpBmNhbGxlcgVieXRlcwQGYW1vdW50CQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAMJAGYCAAAFBmFtb3VudAkAAgECHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgIHX2Ftb3VudAUGYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQUGY2FsbGVyBQZhbW91bnQFBHVuaXQFA25pbAFpAQdkZXBvc2l0ARF1c2VyX3dhbGxldEFkcmVzcwQGY2FsbGVyCAgFAWkGY2FsbGVyBWJ5dGVzBAZhbW91bnQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50AwkAZgIAAAUGYW1vdW50CQACAQIdQ2FuJ3QgZGVwb3NpdCBuZWdhdGl2ZSBhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgISX3VzZXJfd2FsbGV0QWRyZXNzBRF1c2VyX3dhbGxldEFkcmVzcwkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQURdXNlcl93YWxsZXRBZHJlc3MFBmFtb3VudAUEdW5pdAUDbmlsAWkBA2J1eQAFA25pbADwUUKL", "height": 2368554, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5nBAzzXNkS3udrtmL8fWCRBN5dGh3KJkbkA17sMh5UVr Next: F1wCux4e8rdXMkiWEgy1KiNp2KuFJck96d3kL1ZjhqGe Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func token () = {
8- let asset = Issue("shub", "This is an ordinary token", 10000000, 2, true)
9- let assetId = calculateAssetId(asset)
10- let Alice = Address(base58'3NCspLgbmcyQ76ZL6Jw4gFZLmbhwdKKXUQs')
11-[asset, ScriptTransfer(Alice, 1000, assetId)]
7+func withdraw () = {
8+ let caller = i.caller.bytes
9+ let amount = value(i.payments[0].amount)
10+ if ((0 > amount))
11+ then throw("Can't withdraw negative amount")
12+ else [IntegerEntry("_amount", amount), ScriptTransfer(Address(caller), amount, unit)]
1213 }
1314
1415
15-@Verifier(tx)
16-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
16+
17+@Callable(i)
18+func deposit (user_walletAdress) = {
19+ let caller = i.caller.bytes
20+ let amount = value(i.payments[0].amount)
21+ if ((0 > amount))
22+ then throw("Can't deposit negative amount")
23+ else [StringEntry("_user_walletAdress", user_walletAdress), ScriptTransfer(Address(fromBase58String(user_walletAdress)), amount, unit)]
24+ }
25+
26+
27+
28+@Callable(i)
29+func buy () = nil
30+
1731
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func token () = {
8- let asset = Issue("shub", "This is an ordinary token", 10000000, 2, true)
9- let assetId = calculateAssetId(asset)
10- let Alice = Address(base58'3NCspLgbmcyQ76ZL6Jw4gFZLmbhwdKKXUQs')
11-[asset, ScriptTransfer(Alice, 1000, assetId)]
7+func withdraw () = {
8+ let caller = i.caller.bytes
9+ let amount = value(i.payments[0].amount)
10+ if ((0 > amount))
11+ then throw("Can't withdraw negative amount")
12+ else [IntegerEntry("_amount", amount), ScriptTransfer(Address(caller), amount, unit)]
1213 }
1314
1415
15-@Verifier(tx)
16-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
16+
17+@Callable(i)
18+func deposit (user_walletAdress) = {
19+ let caller = i.caller.bytes
20+ let amount = value(i.payments[0].amount)
21+ if ((0 > amount))
22+ then throw("Can't deposit negative amount")
23+ else [StringEntry("_user_walletAdress", user_walletAdress), ScriptTransfer(Address(fromBase58String(user_walletAdress)), amount, unit)]
24+ }
25+
26+
27+
28+@Callable(i)
29+func buy () = nil
30+
1731

github/deemru/w8io/169f3d6 
29.37 ms