tx · DTzz41FSt3mXcBWEvHwKqEr5LdK1zXnFajJ9Tu7PEyb

3MzFYxmuFCZMtDM4xzqBHW6m3ZvNoX4Xe8T:  -0.01400000 Waves

2021.06.05 17:09 [1557159] smart account 3MzFYxmuFCZMtDM4xzqBHW6m3ZvNoX4Xe8T > SELF 0.00000000 Waves

{ "type": 13, "id": "DTzz41FSt3mXcBWEvHwKqEr5LdK1zXnFajJ9Tu7PEyb", "fee": 1400000, "feeAssetId": null, "timestamp": 1622902199194, "version": 2, "chainId": 84, "sender": "3MzFYxmuFCZMtDM4xzqBHW6m3ZvNoX4Xe8T", "senderPublicKey": "6BmCmWEkmyL4KtpmLBbW1T5EDSyu6WhDBx9wy8xedgxJ", "proofs": [ "3cswv4nZ1StsDy7xFNaFUyD5Q2fL7NX94QievvVyV49d96yaShcX1UqrvNrckXACjAZe6Bdi6GuMqQ2zHwwQ4S6s" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAJaXNzdWVnb2xkAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAC0dvbGRBc3NldElEAQAAACA4Trgygj42OSxCqzXCVkjy0fg0SK8264yFzLge7MhhwgQAAAALVVNEVEFzc2V0SUQBAAAAIO1uns5hlJz9zuYakh0t3uLmLZDCTZgfB7wEww+WnHxxBAAAABBQcmljZVBlckdyYW1Hb2xkCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdHQVUvVVNEBAAAAA1OZXdHb2xkVG9Vc2VyCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAAEFByaWNlUGVyR3JhbUdvbGQAAAAAAAAPQkAEAAAAElByZXZpb3VzSXNzdWVkR29sZAkBAAAA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eJWWJmicgnnx2t Next: 4b4WQTgqr8U2P9sBZmE38WDgeMCz9DDhWzeyUUxR1Kjb Diff:
OldNewDifferences
1010 let GoldAssetID = base58'4noTADz7TX4HmjkCMpJAzkfuR6BKxDsSCzp3XJNZAcgy'
1111 let USDTAssetID = base58'GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU'
1212 let PricePerGramGold = getIntegerValue(this, "GAU/USD")
13- let NewGoldToUser = (pmt.amount / PricePerGramGold)
13+ let NewGoldToUser = ((pmt.amount / PricePerGramGold) * 1000000)
1414 let PreviousIssuedGold = getIntegerValue(this, "Total_Issued_Gold:")
1515 let TotalIssuedGold = (PreviousIssuedGold + NewGoldToUser)
1616 if ((pmt.assetId != USDTAssetID))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func issuegold () = {
88 let pmt = value(i.payments[0])
99 let currentKey = toBase58String(i.caller.bytes)
1010 let GoldAssetID = base58'4noTADz7TX4HmjkCMpJAzkfuR6BKxDsSCzp3XJNZAcgy'
1111 let USDTAssetID = base58'GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU'
1212 let PricePerGramGold = getIntegerValue(this, "GAU/USD")
13- let NewGoldToUser = (pmt.amount / PricePerGramGold)
13+ let NewGoldToUser = ((pmt.amount / PricePerGramGold) * 1000000)
1414 let PreviousIssuedGold = getIntegerValue(this, "Total_Issued_Gold:")
1515 let TotalIssuedGold = (PreviousIssuedGold + NewGoldToUser)
1616 if ((pmt.assetId != USDTAssetID))
1717 then throw("Incorrect asset attached, please attach USDT AssetID GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU.")
1818 else if ((1000000 > pmt.amount))
1919 then throw("Please Attach minimum 1 USDT To Issue Gold Asset.")
2020 else [IntegerEntry("Total_Issued_Gold:", TotalIssuedGold), Reissue(GoldAssetID, NewGoldToUser, true), ScriptTransfer(i.caller, NewGoldToUser, GoldAssetID)]
2121 }
2222
2323
2424 @Verifier(tx)
2525 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2626

github/deemru/w8io/026f985 
28.72 ms