tx · 2haiFjzhL9m2D1FczgfTZssMfnSkqeUsu18v6sURC1jC

3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy:  -0.01400000 Waves

2021.05.25 13:19 [1541060] smart account 3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy > SELF 0.00000000 Waves

{ "type": 13, "id": "2haiFjzhL9m2D1FczgfTZssMfnSkqeUsu18v6sURC1jC", "fee": 1400000, "feeAssetId": null, "timestamp": 1621937985300, "version": 2, "chainId": 84, "sender": "3MuBakQdFAobmsHH371bKVYNed6yA9Y2Wfy", "senderPublicKey": "9BAE85H9Tsey8NGdpT5HxdVYHBCmY1prGiG1TSQJxnZe", "proofs": [ "3yik4nLL6XLb2J8E8MQ3saQS5drmbzbwdvhUku5b1mRDzbjjEp2cvKa8gLPCGSdJHRPfjfcsqswBozZbmokKKvnR" ], "script": "base64:AAIEAAAAAAAAABEIAhIDCgEIEgMKAQESAwoBAQAAAAcBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAABm51bWJlcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAAGbnVtYmVyAAAAAAROT05FAgAAAARub25lAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAZzdHJpbmcEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAABnN0cmluZwEAAAAPZ2V0S2V5VXNlckVtYWlsAAAAAQAAAAR1c2VyCQABLAAAAAIJAAEsAAAAAgIAAAAFdXNlcl8FAAAABHVzZXICAAAABl9lbWFpbAEAAAARZ2V0VmFsdWVVc2VyRW1haWwAAAABAAA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AIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABFnZXRLZXlEQXBwQXNzZXRJZAAAAAAJAAJYAAAAAQUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAWkBAAAADHJlaXNzdWVUb2tlbgAAAAEAAAAIcXVhbnRpdHkEAAAAC2RBcHBBc3NldElkCQEAAAATZ2V0VmFsdWVEQXBwQXNzZXRJZAAAAAADCQAAAAAAAAIFAAAAC2RBcHBBc3NldElkBQAAAAROT05FCQAAAgAAAAECAAAAGXRva2VuIGhhcyBub3QgYmVlbiBpc3N1ZWQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADCQACWQAAAAEFAAAAC2RBcHBBc3NldElkBQAAAAhxdWFudGl0eQYFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5ezjpgw==", "height": 1541060, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 27P81D7iWNJLoR5DEtwxxrpndoGZYfHHLbjbjHFLGRW1 Next: G65XF1r2QV6hbrSmMNaGThHX95ar6fBuwSbSEjiM17DW Diff:
OldNewDifferences
4242 let currentUserAddress = toBase58String(i.caller.bytes)
4343 let currentUserEmail = getValueUserEmail(currentUserAddress)
4444 if ((currentUserEmail != NONE))
45- then throw("user already exists")
45+ then throw("user is already registered")
4646 else [StringEntry(getKeyUserEmail(currentUserAddress), email)]
4747 }
4848
5252 func issueToken (quantity) = {
5353 let dAppAssetId = getValueDAppAssetId()
5454 if ((dAppAssetId != NONE))
55- then throw("token already been issued")
55+ then throw("token has already been issued")
5656 else {
5757 let asset = Issue("NYAN-25", "NYAN-25 token", quantity, 0, true)
5858 let assetId = calculateAssetId(asset)
5959 [asset, StringEntry(getKeyDAppAssetId(), toBase58String(assetId))]
6060 }
61+ }
62+
63+
64+
65+@Callable(i)
66+func reissueToken (quantity) = {
67+ let dAppAssetId = getValueDAppAssetId()
68+ if ((dAppAssetId == NONE))
69+ then throw("token has not been issued")
70+ else [Reissue(fromBase58String(dAppAssetId), quantity, true)]
6171 }
6272
6373
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
3434 func getKeyDAppAssetId () = "dApp_assetId"
3535
3636
3737 func getValueDAppAssetId () = getStringByKey(getKeyDAppAssetId())
3838
3939
4040 @Callable(i)
4141 func signUp (email) = {
4242 let currentUserAddress = toBase58String(i.caller.bytes)
4343 let currentUserEmail = getValueUserEmail(currentUserAddress)
4444 if ((currentUserEmail != NONE))
45- then throw("user already exists")
45+ then throw("user is already registered")
4646 else [StringEntry(getKeyUserEmail(currentUserAddress), email)]
4747 }
4848
4949
5050
5151 @Callable(i)
5252 func issueToken (quantity) = {
5353 let dAppAssetId = getValueDAppAssetId()
5454 if ((dAppAssetId != NONE))
55- then throw("token already been issued")
55+ then throw("token has already been issued")
5656 else {
5757 let asset = Issue("NYAN-25", "NYAN-25 token", quantity, 0, true)
5858 let assetId = calculateAssetId(asset)
5959 [asset, StringEntry(getKeyDAppAssetId(), toBase58String(assetId))]
6060 }
61+ }
62+
63+
64+
65+@Callable(i)
66+func reissueToken (quantity) = {
67+ let dAppAssetId = getValueDAppAssetId()
68+ if ((dAppAssetId == NONE))
69+ then throw("token has not been issued")
70+ else [Reissue(fromBase58String(dAppAssetId), quantity, true)]
6171 }
6272
6373
6474 @Verifier(tx)
6575 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6676

github/deemru/w8io/169f3d6 
26.30 ms