tx · EtE7BQn14rbTDUMpv38yEsoBCdtdrvhte7kdtJ7rRxS8
3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo: -0.01400000 Waves
2021.10.09 10:51 [1738457] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves
{
"type": 13,
"id": "EtE7BQn14rbTDUMpv38yEsoBCdtdrvhte7kdtJ7rRxS8",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1633765906609,
"version": 2,
"chainId": 84,
"sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo",
"senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x",
"proofs": [
"26nhzE3pEPz2AEhcMoBE75AnnJC3dERn1RRa3C1TK9X6jdf2oYHVDr1vKoouLYVmJb5QJwzW254UXbJnwEAdRaP4"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACAAAAAALQ09ERUFzc2V0SUQBAAAAINAEYRpFnLQZXHk7APbo5tWij1YQ2cG3R/UN12TTTH73AAAAAAdvbmVob3VyAAAAAAAANu6AAAAAAAZvbmVkYXkAAAAAAAUmXAAAAAAAB29uZXdlZWsAAAAAACQMhAAAAAAACG9uZW1vbnRoAAAAAACcv5BAAAAAAA5TdGFydEluZmxhdGlvbgkAAGwAAAAGAAAAAAAAAAAKAAAAAAAAAAACAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAACBQAAAAJVUAAAAAAKRmVlQWRkcmVzcwEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAACmRldkFkZHJlc3MBAAAAIHE/Oe1BrsJepSkes1ESh96Qyq2U5VDLF1kF2MXI1ngbAAAAAQAAAAFpAQAAAAVDbGFpbQAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAtDT0RFQXNzZXRJRAkAAAIAAAABCQABLAAAAAICAAAAKEluY29ycmVjdCBhc3NldCBhdHRhY2hlZCwgcGxlYXNlIGF0dGFjaCAJAAJYAAAAAQUAAAALQ09ERUFzc2V0SUQDCQAAZgAAAAIAAAAAAABMS0AIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAECAAAAMlBsZWFzZSBBdHRhY2ggbWluaW11bSAwLjA1IFROIFRvIElzc3VlIENPREUgQXNzZXQuCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAlJbmZsYXRpb24FAAAADlN0YXJ0SW5mbGF0aW9uBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledrKzTY=",
"height": 1738457,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: BDJxdkCXAinYsW9fUMgcsHg7hCvNsTkejEqP5cPC3YNk
Next: 3stDvzzk5umsmBptDpSfBhtPkNiKv5wjhSov5TwA39YK
Diff:
Old | New | | Differences |
---|
21 | 21 | | func Claim () = { |
---|
22 | 22 | | let pmt = value(i.payments[0]) |
---|
23 | 23 | | let currentKey = toBase58String(i.caller.bytes) |
---|
24 | | - | let PricePerCODE = getIntegerValue(this, "CODE/TN") |
---|
25 | | - | let CODEHardCap = getIntegerValue(this, "CODEHardCap") |
---|
26 | | - | let NewCODEToUser = fraction(100000, pmt.amount, PricePerCODE) |
---|
27 | | - | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") |
---|
28 | | - | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) |
---|
29 | | - | let PendingMinting = (CODEHardCap - TotalIssuedCODE) |
---|
30 | | - | let PreviousCODEReserveValue = getIntegerValue(this, "Total_CODE_Reserve_In_TN:") |
---|
31 | | - | let CODEReserveValue = (PreviousCODEReserveValue + pmt.amount) |
---|
32 | | - | let PreviousCODEBackupPrice = getIntegerValue(this, "CODE_Backup_Value_In_TN:") |
---|
33 | | - | let CODEBackupPrice = fraction(100000, CODEReserveValue, TotalIssuedCODE) |
---|
34 | 24 | | if ((pmt.assetId != CODEAssetID)) |
---|
35 | 25 | | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) |
---|
36 | 26 | | else if ((5000000 > pmt.amount)) |
---|
37 | 27 | | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") |
---|
38 | | - | else if ((TotalIssuedCODE > CODEHardCap)) |
---|
39 | | - | then throw((((((("CODE Minting is about to reach the Hard Cap of " + toString(CODEHardCap)) + "/10^8 CODE. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((CODEHardCap - PreviousIssuedCODE))) + "/10^8")) |
---|
40 | | - | else [IntegerEntry("Inflation", StartInflation)] |
---|
| 28 | + | else [IntegerEntry("Inflation", StartInflation)] |
---|
41 | 29 | | } |
---|
42 | 30 | | |
---|
43 | 31 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let CODEAssetID = base58'F11g74azdw3SZN83raygbu9useimfTwSQ7HmTLggAq26' |
---|
5 | 5 | | |
---|
6 | 6 | | let onehour = 3600000 |
---|
7 | 7 | | |
---|
8 | 8 | | let oneday = 86400000 |
---|
9 | 9 | | |
---|
10 | 10 | | let oneweek = 604800000 |
---|
11 | 11 | | |
---|
12 | 12 | | let onemonth = 2629800000 |
---|
13 | 13 | | |
---|
14 | 14 | | let StartInflation = pow(10, 2, 3, 0, 2, UP) |
---|
15 | 15 | | |
---|
16 | 16 | | let FeeAddress = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR' |
---|
17 | 17 | | |
---|
18 | 18 | | let devAddress = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' |
---|
19 | 19 | | |
---|
20 | 20 | | @Callable(i) |
---|
21 | 21 | | func Claim () = { |
---|
22 | 22 | | let pmt = value(i.payments[0]) |
---|
23 | 23 | | let currentKey = toBase58String(i.caller.bytes) |
---|
24 | | - | let PricePerCODE = getIntegerValue(this, "CODE/TN") |
---|
25 | | - | let CODEHardCap = getIntegerValue(this, "CODEHardCap") |
---|
26 | | - | let NewCODEToUser = fraction(100000, pmt.amount, PricePerCODE) |
---|
27 | | - | let PreviousIssuedCODE = getIntegerValue(this, "Total_Issued_CODE:") |
---|
28 | | - | let TotalIssuedCODE = (PreviousIssuedCODE + NewCODEToUser) |
---|
29 | | - | let PendingMinting = (CODEHardCap - TotalIssuedCODE) |
---|
30 | | - | let PreviousCODEReserveValue = getIntegerValue(this, "Total_CODE_Reserve_In_TN:") |
---|
31 | | - | let CODEReserveValue = (PreviousCODEReserveValue + pmt.amount) |
---|
32 | | - | let PreviousCODEBackupPrice = getIntegerValue(this, "CODE_Backup_Value_In_TN:") |
---|
33 | | - | let CODEBackupPrice = fraction(100000, CODEReserveValue, TotalIssuedCODE) |
---|
34 | 24 | | if ((pmt.assetId != CODEAssetID)) |
---|
35 | 25 | | then throw(("Incorrect asset attached, please attach " + toBase58String(CODEAssetID))) |
---|
36 | 26 | | else if ((5000000 > pmt.amount)) |
---|
37 | 27 | | then throw("Please Attach minimum 0.05 TN To Issue CODE Asset.") |
---|
38 | | - | else if ((TotalIssuedCODE > CODEHardCap)) |
---|
39 | | - | then throw((((((("CODE Minting is about to reach the Hard Cap of " + toString(CODEHardCap)) + "/10^8 CODE. Please Reduce your Minting Order by ") + toString(PendingMinting)) + " or put ") + toString((CODEHardCap - PreviousIssuedCODE))) + "/10^8")) |
---|
40 | | - | else [IntegerEntry("Inflation", StartInflation)] |
---|
| 28 | + | else [IntegerEntry("Inflation", StartInflation)] |
---|
41 | 29 | | } |
---|
42 | 30 | | |
---|
43 | 31 | | |
---|
44 | 32 | | @Verifier(tx) |
---|
45 | 33 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
46 | 34 | | |
---|