tx · CnFUJEBqRKGE8FWjZPPyq9ebzgcpzXnb5kvkkvWfiLbD
3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx: -0.01400000 Waves
2022.09.05 04:39 [2215166] smart account 3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx > SELF 0.00000000 Waves
{
"type": 13,
"id": "CnFUJEBqRKGE8FWjZPPyq9ebzgcpzXnb5kvkkvWfiLbD",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1662341967921,
"version": 2,
"chainId": 84,
"sender": "3MqxNQues3HH3kBjuzTSnJ7UKwmS9hgnxxx",
"senderPublicKey": "3karvhVe3LgRMXprezaPpdeYknh9ju1rETVV3zdunQ1p",
"proofs": [
"dCTCDTewxvzC2F13h1NKNDMwghq8mk2jtAbqQ4tKMStRyMziqtTgGeB5Swd49GV5furq6aMcfGik4r62D7SAMcH"
],
"script": "base64:AAIEAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAABAAAAAAtDT0RFQXNzZXRJRAEAAAAgCGWEtw/wimoa8+Jo6C4IkCTD0ydYA80s9i5eC9/aFaQAAAACAAAAAWkBAAAAEFJlZ2lzdGVyVXNlck5hbWUAAAABAAAACFVzZXJOYW1lBAAAAANwbXQIBQAAAAFpAAAACHBheW1lbnRzBAAAAAtjaGVja3NlcmllcwkABB0AAAACBQAAAAR0aGlzBQAAAAhVc2VyTmFtZQMJAABmAAAAAgAAAAAAAAAAAwkAATEAAAABBQAAAAhVc2VyTmFtZQkAAAIAAAABAgAAACdDaG9vc2UgYSBVbmlxdWUgVXNlck5hbWUgYWJvdmUgMyBDaGFycy4DCQAAAAAAAAIFAAAAC2NoZWNrc2VyaWVzBQAAAAhVc2VyTmFtZQkAAAIAAAABAgAAAGVVc2VyIE5hbWUgQWxyZWFkeSBFeGlzdCBvciBUYWtlbi4gQ2hvb3NlIEFub3RoZXIgVW5pcXVlIFVzZXIgTmFtZSBvciBDaG9vc2UgUmVmaWxsIHRvIHJlZmlsbCBhY2Nvd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ElEAgAAAAsgYXNzZXQgb25seQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAA9EZXBvc2l0X0Ftb3VudF8FAAAACFVzZXJOYW1lBQAAABRuZXdEZXBvc2l0Q09ERUFtb3VudAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXld2yXJ",
"height": 2215166,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9J76DzUTJbqZSLnitf5cSF1fFNxXwjyZ1rw4BZh2nhrP
Next: 2VFucK6Dyk7Q2KUc3KfLGuJiqht9g8wFU4jjg1xTpGej
Diff:
Old | New | | Differences |
---|
15 | 15 | | } |
---|
16 | 16 | | |
---|
17 | 17 | | |
---|
| 18 | + | |
---|
| 19 | + | @Callable(i) |
---|
| 20 | + | func Recharge (UserName) = { |
---|
| 21 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 22 | + | then i.payments[0] |
---|
| 23 | + | else throw((("No payment attached, Please Attach CODE Token [" + toBase58String(CODEAssetID)) + "]")) |
---|
| 24 | + | let DepositCODEAmount = match getInteger(this, ("Deposit_Amount_" + UserName)) { |
---|
| 25 | + | case a: Int => |
---|
| 26 | + | a |
---|
| 27 | + | case _ => |
---|
| 28 | + | 0 |
---|
| 29 | + | } |
---|
| 30 | + | let newDepositCODEAmount = (DepositCODEAmount + pmt.amount) |
---|
| 31 | + | if ((pmt.assetId != CODEAssetID)) |
---|
| 32 | + | then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only")) |
---|
| 33 | + | else if ((pmt.amount != 1000)) |
---|
| 34 | + | then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only")) |
---|
| 35 | + | else [IntegerEntry(("Deposit_Amount_" + UserName), newDepositCODEAmount)] |
---|
| 36 | + | } |
---|
| 37 | + | |
---|
| 38 | + | |
---|
18 | 39 | | @Verifier(tx) |
---|
19 | 40 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
20 | 41 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let CODEAssetID = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func RegisterUserName (UserName) = { |
---|
8 | 8 | | let pmt = i.payments |
---|
9 | 9 | | let checkseries = getString(this, UserName) |
---|
10 | 10 | | if ((3 > size(UserName))) |
---|
11 | 11 | | then throw("Choose a Unique UserName above 3 Chars.") |
---|
12 | 12 | | else if ((checkseries == UserName)) |
---|
13 | 13 | | then throw("User Name Already Exist or Taken. Choose Another Unique User Name or Choose Refill to refill account.") |
---|
14 | 14 | | else [StringEntry(UserName, UserName)] |
---|
15 | 15 | | } |
---|
16 | 16 | | |
---|
17 | 17 | | |
---|
| 18 | + | |
---|
| 19 | + | @Callable(i) |
---|
| 20 | + | func Recharge (UserName) = { |
---|
| 21 | + | let pmt = if ((size(i.payments) == 1)) |
---|
| 22 | + | then i.payments[0] |
---|
| 23 | + | else throw((("No payment attached, Please Attach CODE Token [" + toBase58String(CODEAssetID)) + "]")) |
---|
| 24 | + | let DepositCODEAmount = match getInteger(this, ("Deposit_Amount_" + UserName)) { |
---|
| 25 | + | case a: Int => |
---|
| 26 | + | a |
---|
| 27 | + | case _ => |
---|
| 28 | + | 0 |
---|
| 29 | + | } |
---|
| 30 | + | let newDepositCODEAmount = (DepositCODEAmount + pmt.amount) |
---|
| 31 | + | if ((pmt.assetId != CODEAssetID)) |
---|
| 32 | + | then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only")) |
---|
| 33 | + | else if ((pmt.amount != 1000)) |
---|
| 34 | + | then throw((("Incorrect asset attached, please attach " + toBase58String(CODEAssetID)) + " asset only")) |
---|
| 35 | + | else [IntegerEntry(("Deposit_Amount_" + UserName), newDepositCODEAmount)] |
---|
| 36 | + | } |
---|
| 37 | + | |
---|
| 38 | + | |
---|
18 | 39 | | @Verifier(tx) |
---|
19 | 40 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
20 | 41 | | |
---|