tx · 2ui9HngL45hMbzpu7KFXjXRYRuq2Jzuh8gjdLcn2dkHy

3N356YfN19XTJNfZ1sE9kssQwTxvyMLq7MT:  -0.01000000 Waves

2022.05.31 13:55 [2075744] smart account 3N356YfN19XTJNfZ1sE9kssQwTxvyMLq7MT > SELF 0.00000000 Waves

{ "type": 13, "id": "2ui9HngL45hMbzpu7KFXjXRYRuq2Jzuh8gjdLcn2dkHy", "fee": 1000000, "feeAssetId": null, "timestamp": 1653994577051, "version": 2, "chainId": 84, "sender": "3N356YfN19XTJNfZ1sE9kssQwTxvyMLq7MT", "senderPublicKey": "5FCKdCQ3s4naiaoX3iSwKqTAHzcVkGi6M48BnWuHjJ5u", "proofs": [ "P1H4z73jT98Y7XbVhb4VmzmsUWioQ6vRtvodekLwuWq3xgdfCkL6VWQQw5KksLAHQepSC6bAckRUuLhZFkQRPwf" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAAAgAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQBAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAUAAAANUEFZTUVOVF9BU1NFVAMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAIcHJpY2VLZXkCAAAACmxhc3RfcHJpY2UEAAAACmludGVnZXJWYWwJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMFAAAACHByaWNlS2V5AAAAAAAC+vCABAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yB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bnRlZ2VyVmFsAAAAAAAAmJaABAAAAANpZGEJAAQ4AAAAAQUAAAAGaXNzdWVyCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAARMAAAAAgUAAAAGaXNzdWVyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABpAAAAAEFAAAAAmlkAgAAAAFfBQAAAAx3YWxsZXRTdHJpbmcJAAJYAAAAAQUAAAADaWRhCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAADaWRhCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAAhwcmljZUtleQUAAAAIbmV3UHJpY2UFAAAAA25pbAIAAAAQYW4gZXJyb3Igb2NjdXJlZAkAAAIAAAABAgAAAB5hbHJlYWR5IG1pbnRlZCBieSBzb21lb25lIGVsc2UJAAACAAAAAQIAAAAeV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQuCQAAAgAAAAECAAAADG91dCBvZiByYW5nZQAAAABSsAwc", "height": 2075744, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GzKLNWueaFXZYrDjnb2FfCqX3hcmYyyRTZCEaTFSUXLZ Next: FXzeqQxNGRTATwXwGiQSzYS2NkSXncYzYrwUUPeiqv5D Diff:
OldNewDifferences
1919 case _ =>
2020 throw("Wrong payment asset or min amount 50 USDN")
2121 }
22- }
23- }
24-
25-
26-func pricer () = {
27- let priceKey = "last_price"
28- let integerVal = valueOrElse(getIntegerValue(this, priceKey), 0)
29- if ((integerVal == 0))
30- then [IntegerEntry(priceKey, 50000000)]
31- else {
32- let newPrice = (integerVal + 10000000)
33-[IntegerEntry(priceKey, newPrice)]
3422 }
3523 }
3624
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PAYMENT_ASSET = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh'
55
66 func isPaymentOk (i) = {
77 let acceptableAssetId = PAYMENT_ASSET
88 if ((size(i.payments) == 0))
99 then throw("Payment not attached")
1010 else {
1111 let p = i.payments[0]
1212 let priceKey = "last_price"
1313 let integerVal = valueOrElse(getIntegerValue(this, priceKey), 50000000)
1414 match p.assetId {
1515 case assetId: ByteVector =>
1616 if ((assetId == PAYMENT_ASSET))
1717 then (p.amount == integerVal)
1818 else false
1919 case _ =>
2020 throw("Wrong payment asset or min amount 50 USDN")
2121 }
22- }
23- }
24-
25-
26-func pricer () = {
27- let priceKey = "last_price"
28- let integerVal = valueOrElse(getIntegerValue(this, priceKey), 0)
29- if ((integerVal == 0))
30- then [IntegerEntry(priceKey, 50000000)]
31- else {
32- let newPrice = (integerVal + 10000000)
33-[IntegerEntry(priceKey, newPrice)]
3422 }
3523 }
3624
3725
3826 @Callable(i)
3927 func mintPokemon (id) = {
4028 let walletString = toBase58String(i.caller.bytes)
4129 if (if ((id > 0))
4230 then true
4331 else (151 >= id))
4432 then if (isPaymentOk(i))
4533 then {
4634 let stringId = toString(id)
4735 let idCheck = valueOrElse(getString(this, stringId), "none")
4836 let toSet = ((toString(id) + "_w_") + walletString)
4937 let NFTNAME = ("POKEMON_NFT" + toString(id))
5038 if ((idCheck == "none"))
5139 then {
5240 let issuer = Issue(NFTNAME, ("POKEMON_NFT_" + toString(id)), 1, 0, false)
5341 let priceKey = "last_price"
5442 let integerVal = valueOrElse(getIntegerValue(this, priceKey), 0)
5543 let newPrice = (integerVal + 10000000)
5644 let ida = calculateAssetId(issuer)
5745 valueOrErrorMessage([issuer, StringEntry(((toString(id) + "_") + walletString), toBase58String(ida)), ScriptTransfer(i.caller, 1, ida), IntegerEntry(priceKey, newPrice)], "an error occured")
5846 }
5947 else throw("already minted by someone else")
6048 }
6149 else throw("Wrong payment amount or asset.")
6250 else throw("out of range")
6351 }
6452
6553

github/deemru/w8io/169f3d6 
35.64 ms