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+WnHxxBAAAABBQcmljZVBlckdyYW1Hb2xkCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdHQVUvVVNEBAAAAA1OZXdHb2xkVG9Vc2VyCQAAaAAAAAIJAABpAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAAEFByaWNlUGVyR3JhbUdvbGQAAAAAAAAPQkAEAAAAElByZXZpb3VzSXNzdWVkR29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AtbRy8q9RfFy7XeJWWJmicgnnx2t
Next: 4b4WQTgqr8U2P9sBZmE38WDgeMCz9DDhWzeyUUxR1Kjb
Diff:
Old | New | | Differences |
---|
10 | 10 | | let GoldAssetID = base58'4noTADz7TX4HmjkCMpJAzkfuR6BKxDsSCzp3XJNZAcgy' |
---|
11 | 11 | | let USDTAssetID = base58'GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU' |
---|
12 | 12 | | let PricePerGramGold = getIntegerValue(this, "GAU/USD") |
---|
13 | | - | let NewGoldToUser = (pmt.amount / PricePerGramGold) |
---|
| 13 | + | let NewGoldToUser = ((pmt.amount / PricePerGramGold) * 1000000) |
---|
14 | 14 | | let PreviousIssuedGold = getIntegerValue(this, "Total_Issued_Gold:") |
---|
15 | 15 | | let TotalIssuedGold = (PreviousIssuedGold + NewGoldToUser) |
---|
16 | 16 | | if ((pmt.assetId != USDTAssetID)) |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func issuegold () = { |
---|
8 | 8 | | let pmt = value(i.payments[0]) |
---|
9 | 9 | | let currentKey = toBase58String(i.caller.bytes) |
---|
10 | 10 | | let GoldAssetID = base58'4noTADz7TX4HmjkCMpJAzkfuR6BKxDsSCzp3XJNZAcgy' |
---|
11 | 11 | | let USDTAssetID = base58'GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU' |
---|
12 | 12 | | let PricePerGramGold = getIntegerValue(this, "GAU/USD") |
---|
13 | | - | let NewGoldToUser = (pmt.amount / PricePerGramGold) |
---|
| 13 | + | let NewGoldToUser = ((pmt.amount / PricePerGramGold) * 1000000) |
---|
14 | 14 | | let PreviousIssuedGold = getIntegerValue(this, "Total_Issued_Gold:") |
---|
15 | 15 | | let TotalIssuedGold = (PreviousIssuedGold + NewGoldToUser) |
---|
16 | 16 | | if ((pmt.assetId != USDTAssetID)) |
---|
17 | 17 | | then throw("Incorrect asset attached, please attach USDT AssetID GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU.") |
---|
18 | 18 | | else if ((1000000 > pmt.amount)) |
---|
19 | 19 | | then throw("Please Attach minimum 1 USDT To Issue Gold Asset.") |
---|
20 | 20 | | else [IntegerEntry("Total_Issued_Gold:", TotalIssuedGold), Reissue(GoldAssetID, NewGoldToUser, true), ScriptTransfer(i.caller, NewGoldToUser, GoldAssetID)] |
---|
21 | 21 | | } |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | @Verifier(tx) |
---|
25 | 25 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
26 | 26 | | |
---|