tx · DLBmJXK24o4Cp8tKu8vFgLT7g6mJH2kGtmZJLZcVkZhd

3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy:  -0.01400000 Waves

2021.05.25 12:59 [1541038] smart account 3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy > SELF 0.00000000 Waves

{ "type": 13, "id": "DLBmJXK24o4Cp8tKu8vFgLT7g6mJH2kGtmZJLZcVkZhd", "fee": 1400000, "feeAssetId": null, "timestamp": 1621936849887, "version": 2, "chainId": 84, "sender": "3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy", "senderPublicKey": "9BAE85H9Tsey8NGdpT5HxdVYHBCmY1prGiG1TSQJxnZe", "proofs": [ "SkkSYcM2NFNGpHBb8TY2rTeQCY73z1pqafEkvG3jNoT5TGWsueU2jxpBx9VVBo1WnZoeN9auZJr5xQMxU2eqnuv" ], "script": "base64:AAIEAAAAAAAAAAwIAhIDCgEIEgMKAQEAAAAHAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAZudW1iZXIEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAABm51bWJlcgAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAGc3RyaW5nBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAAZzdHJpbmcBAAAAD2dldEtleVVzZXJFbWFpbAAAAAEAAAAEdXNlcgkAASwAAAACCQABLAAAAAICAAAABXVzZXJfBQAAAAR1c2VyAgAAAAZfZW1haWwBAAAAEWdldFZhbHVlVXNlckVtY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AAAAtkQXBwQXNzZXRJZAkAAlgAAAABBQAAAAdhc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVEp+tY=", "height": 1541038, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CqTNAzrYTqVVZfRaGpb624TCuEjB3ZwsBdMsj6o8i3CN Next: 8mTdgGVF5YZPpLfKf2SLfcKHuUqWA8dF49xReNdevnCb Diff:
OldNewDifferences
3131 func getValueUserEmail (user) = getStringByKey(getKeyUserEmail(user))
3232
3333
34+func getKeyDAppAssetId () = "dApp_assetId"
35+
36+
37+func getValueDAppAssetId () = getStringByKey(getKeyDAppAssetId())
38+
39+
3440 @Callable(i)
3541 func signUp (email) = {
3642 let currentUserAddress = toBase58String(i.caller.bytes)
4147 }
4248
4349
50+
51+@Callable(i)
52+func issueToken (quantity) = {
53+ let dAppAssetId = getKeyDAppAssetId()
54+ if ((dAppAssetId != NONE))
55+ then throw("token already been issued")
56+ else {
57+ let asset = Issue("NYAN-25", "NYAN-25 token", quantity, 0, true)
58+ let assetId = calculateAssetId(asset)
59+[StringEntry(dAppAssetId, toBase58String(assetId))]
60+ }
61+ }
62+
63+
4464 @Verifier(tx)
4565 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4666
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = {
55 let number = match getInteger(this, key) {
66 case a: Int =>
77 a
88 case _ =>
99 0
1010 }
1111 number
1212 }
1313
1414
1515 let NONE = "none"
1616
1717 func getStringByKey (key) = {
1818 let string = match getString(this, key) {
1919 case a: String =>
2020 a
2121 case _ =>
2222 NONE
2323 }
2424 string
2525 }
2626
2727
2828 func getKeyUserEmail (user) = (("user_" + user) + "_email")
2929
3030
3131 func getValueUserEmail (user) = getStringByKey(getKeyUserEmail(user))
3232
3333
34+func getKeyDAppAssetId () = "dApp_assetId"
35+
36+
37+func getValueDAppAssetId () = getStringByKey(getKeyDAppAssetId())
38+
39+
3440 @Callable(i)
3541 func signUp (email) = {
3642 let currentUserAddress = toBase58String(i.caller.bytes)
3743 let currentUserEmail = getKeyUserEmail(currentUserAddress)
3844 if ((currentUserEmail != NONE))
3945 then throw("user already exists")
4046 else [StringEntry(getKeyUserEmail(currentUserAddress), email)]
4147 }
4248
4349
50+
51+@Callable(i)
52+func issueToken (quantity) = {
53+ let dAppAssetId = getKeyDAppAssetId()
54+ if ((dAppAssetId != NONE))
55+ then throw("token already been issued")
56+ else {
57+ let asset = Issue("NYAN-25", "NYAN-25 token", quantity, 0, true)
58+ let assetId = calculateAssetId(asset)
59+[StringEntry(dAppAssetId, toBase58String(assetId))]
60+ }
61+ }
62+
63+
4464 @Verifier(tx)
4565 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4666

github/deemru/w8io/169f3d6 
31.07 ms