tx · D4z7dwdLVriabLQwytQUEGdzXRvjQNGdoPSA5Feb4ka

3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo:  -0.01400000 Waves

2021.10.14 12:36 [1745755] smart account 3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo > SELF 0.00000000 Waves

{ "type": 13, "id": "D4z7dwdLVriabLQwytQUEGdzXRvjQNGdoPSA5Feb4ka", "fee": 1400000, "feeAssetId": null, "timestamp": 1634204165531, "version": 2, "chainId": 84, "sender": "3N34Zi5VD4m9az4kEXWDJngkMHMTpqLcoqo", "senderPublicKey": "AmXrJ1inc5jpKhf6D9aDcRU8QWHZXBJdBBvz9VsKDe9x", "proofs": [ "MRGgYnA2FckvcVYnjteih7th91nnhPn8YX4F7HgTU4Q7RbZLJ1BuP2cyUtzrFwBX9WqaYf5CEJpPk8Lw73dDPaF" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEBEgAAAAAKAAAAAAtDT0RFQXNzZXRJRAEAAAAgkmB2qfKrqGeDE5s+bUmRW9TL3ErNp4dEODxuXgzu+JEAAAAAC1N0YXJ0SGVpZ2h0AAAAAAAAGqH4AAAAAAZvbmVkYXkAAAAAAAAABaAAAAAAD21pbmltdW1sb2NrZGF5cwAAAAAAAAAABgAAAAAPbWF4aW11bWxvY2tkYXlzAAAAAAAAAAAHAAAAAAlibG9ja2RpZmYJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtTdGFydEhlaWdodAAAAAALSW5mbGF0aW9uTm8JAABkAAAAAgkAAGsAAAADAAAAAAJUC+QAAAAAAAAAAAABBQAAAAlibG9ja2RpZmYAAAAAAAAAF3AAAAAAC1N0YWtpbmdEYXBwAQAAACCjtaSeUVhAbk0T+akFnLGoDh+X4aR50o/42ilEuU4EFgAAAAAKRmVlQWRkcmVzcwEAAAAgUoPZoIvXkJI7M+XgQERyG3Ox4PxeH5gdLMWeskjH4iAAAAAACmRldkFkZHJlc3MBAAAAIHE/Oe1BrsJepSkes1ESh96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AnR4AAAAD3NlbmRlclB1YmxpY0tleZ7ZNPU=", "height": 1745755, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FVpz14Ng6RHz1uoaoe8xomDYGgCPUSANaoWrnijKiv7L Next: BtzgpFskaDufiskqgYxyhGmQVmoQu7ZVsR4cUVbjf8Ej Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'F11g74azdw3SZN83raygbu9useimfTwSQ7HmTLggAq26'
4+let a = base58'ArPqXguhFLjJt5XwcNwhXMnCv2zSumrM19y5WgT34yRi'
55
66 let b = 1745400
77
4040 let y = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Deposit_height_Of_" + n)), "Your Address not Found on Staking DApp")
4141 let z = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Total_Lock_Blocks_Of_" + n)), "Your Address not Found on Staking DApp")
4242 let A = (z - y)
43+ let B = {
44+ let C = getInteger(this, "Staked_Amount")
45+ if ($isInstanceOf(C, "Int"))
46+ then {
47+ let D = C
48+ D
49+ }
50+ else 0
51+ }
52+ let E = (B + m.amount)
53+ let F = {
54+ let C = getInteger(this, ("Deposit_Amount_Of_" + n))
55+ if ($isInstanceOf(C, "Int"))
56+ then {
57+ let D = C
58+ D
59+ }
60+ else 0
61+ }
62+ let G = (F + m.amount)
4363 if ((b > height))
4464 then throw((("DApp is Not Started Yet please Wait until " + toString((b - height))) + " blocks"))
4565 else if ((m.assetId != a))
5474 then throw((("You can attach maximum " + toString(p)) + "/10^8 CODE."))
5575 else if ((A != 129600))
5676 then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.")
57- else [Burn(a, m.amount), IntegerEntry("Total_Issued_CODE:", t), IntegerEntry("Total_Burned_CODE:", v), IntegerEntry("Total_Txns:", x), IntegerEntry("Inflation", g), IntegerEntry(("Deposit_height_Of_" + n), height), IntegerEntry(("Total_Lock_Blocks_Of_" + n), r), IntegerEntry(("Claim_Amount_" + n), o), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>"), ScriptTransfer(k.caller, o, a)]
77+ else [Burn(a, m.amount), IntegerEntry("Total_Issued_CODE:", t), IntegerEntry("Total_Burned_CODE:", v), IntegerEntry("Staked_Amount", E), IntegerEntry("Total_Txns:", x), IntegerEntry("Inflation", g), IntegerEntry(("Deposit_height_Of_" + n), height), IntegerEntry(("Deposit_Amount_Of_" + n), G), IntegerEntry(("Total_Lock_Blocks_Of_" + n), r), IntegerEntry(("Rewards_Of_" + n), o), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")]
5878 }
5979
6080
61-@Verifier(B)
62-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
81+
82+@Callable(k)
83+func Withdraw () = {
84+ let n = toBase58String(k.caller.bytes)
85+ let H = getIntegerValue(this, ("Deposit_Amount_Of_" + n))
86+ let I = getIntegerValue(this, "Staked_Amount")
87+ let J = (I - H)
88+ let K = getIntegerValue(this, "Total_CODE_Claimed:")
89+ let L = (K + getIntegerValue(this, ("Rewards_Of_" + n)))
90+ if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) > height))
91+ then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + n)))) + " CODE are Under Lock. Consider last 8 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) - height))))
92+ else if ((H == 0))
93+ then throw("You Have Already Withdraw your CODE Amount.")
94+ else [Reissue(a, getIntegerValue(this, ("Deposit_Amount_Of_" + n)), true), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", J), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", L)]
95+ }
96+
97+
98+@Verifier(M)
99+func N () = sigVerify(M.bodyBytes, M.proofs[0], M.senderPublicKey)
63100
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'F11g74azdw3SZN83raygbu9useimfTwSQ7HmTLggAq26'
4+let a = base58'ArPqXguhFLjJt5XwcNwhXMnCv2zSumrM19y5WgT34yRi'
55
66 let b = 1745400
77
88 let c = 1440
99
1010 let d = 6
1111
1212 let e = 7
1313
1414 let f = (height - b)
1515
1616 let g = (fraction(10000000000, 1, f) + 6000)
1717
1818 let h = base58'C246qxhuyo9DBk1pjMzEQSVAWmiqYupG2swGkxTeAvLV'
1919
2020 let i = base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR'
2121
2222 let j = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
2323
2424 @Callable(k)
2525 func Deposit (l) = {
2626 let m = if ((size(k.payments) == 1))
2727 then k.payments[0]
2828 else throw("No Payments Attached Please Attach CODE Asset Only.")
2929 let n = toBase58String(k.caller.bytes)
3030 let o = ((((g * m.amount) * l) / 365) / 1000)
3131 let p = (f * 100000)
3232 let q = (c * l)
3333 let r = (height + q)
3434 let s = getIntegerValue(this, "Total_Issued_CODE:")
3535 let t = (s + o)
3636 let u = getIntegerValue(this, "Total_Burned_CODE:")
3737 let v = (u + m.amount)
3838 let w = getIntegerValue(this, "Total_Txns:")
3939 let x = (w + 1)
4040 let y = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Deposit_height_Of_" + n)), "Your Address not Found on Staking DApp")
4141 let z = valueOrErrorMessage(getInteger(addressFromPublicKey(h), ("Total_Lock_Blocks_Of_" + n)), "Your Address not Found on Staking DApp")
4242 let A = (z - y)
43+ let B = {
44+ let C = getInteger(this, "Staked_Amount")
45+ if ($isInstanceOf(C, "Int"))
46+ then {
47+ let D = C
48+ D
49+ }
50+ else 0
51+ }
52+ let E = (B + m.amount)
53+ let F = {
54+ let C = getInteger(this, ("Deposit_Amount_Of_" + n))
55+ if ($isInstanceOf(C, "Int"))
56+ then {
57+ let D = C
58+ D
59+ }
60+ else 0
61+ }
62+ let G = (F + m.amount)
4363 if ((b > height))
4464 then throw((("DApp is Not Started Yet please Wait until " + toString((b - height))) + " blocks"))
4565 else if ((m.assetId != a))
4666 then throw(("Incorrect asset attached, please attach " + toBase58String(a)))
4767 else if ((d >= l))
4868 then throw(((("Choose Locking days in between " + toString((d + 1))) + " to ") + toString(e)))
4969 else if ((l > e))
5070 then throw(((((("You Entered days to " + toString(l)) + ", Please Enter no. of days in between ") + toString((d + 1))) + " to ") + toString(e)))
5171 else if ((100000 > m.amount))
5272 then throw("Please Attach minimum 0.001 CODE To Issue CODE Asset.")
5373 else if ((m.amount > p))
5474 then throw((("You can attach maximum " + toString(p)) + "/10^8 CODE."))
5575 else if ((A != 129600))
5676 then throw("You are Not Eligible to Mint CODE. It need minimum 90 Days Staking.")
57- else [Burn(a, m.amount), IntegerEntry("Total_Issued_CODE:", t), IntegerEntry("Total_Burned_CODE:", v), IntegerEntry("Total_Txns:", x), IntegerEntry("Inflation", g), IntegerEntry(("Deposit_height_Of_" + n), height), IntegerEntry(("Total_Lock_Blocks_Of_" + n), r), IntegerEntry(("Claim_Amount_" + n), o), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>"), ScriptTransfer(k.caller, o, a)]
77+ else [Burn(a, m.amount), IntegerEntry("Total_Issued_CODE:", t), IntegerEntry("Total_Burned_CODE:", v), IntegerEntry("Staked_Amount", E), IntegerEntry("Total_Txns:", x), IntegerEntry("Inflation", g), IntegerEntry(("Deposit_height_Of_" + n), height), IntegerEntry(("Deposit_Amount_Of_" + n), G), IntegerEntry(("Total_Lock_Blocks_Of_" + n), r), IntegerEntry(("Rewards_Of_" + n), o), StringEntry("message", "<h1>CODE Issued Successfully!</h1><br>")]
5878 }
5979
6080
61-@Verifier(B)
62-func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
81+
82+@Callable(k)
83+func Withdraw () = {
84+ let n = toBase58String(k.caller.bytes)
85+ let H = getIntegerValue(this, ("Deposit_Amount_Of_" + n))
86+ let I = getIntegerValue(this, "Staked_Amount")
87+ let J = (I - H)
88+ let K = getIntegerValue(this, "Total_CODE_Claimed:")
89+ let L = (K + getIntegerValue(this, ("Rewards_Of_" + n)))
90+ if ((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) > height))
91+ then throw(((("Your " + toString(getIntegerValue(this, ("Deposit_Amount_Of_" + n)))) + " CODE are Under Lock. Consider last 8 digits as value after Decimals. Token will be Unlocked after ") + toString((getIntegerValue(this, ("Total_Lock_Blocks_Of_" + n)) - height))))
92+ else if ((H == 0))
93+ then throw("You Have Already Withdraw your CODE Amount.")
94+ else [Reissue(a, getIntegerValue(this, ("Deposit_Amount_Of_" + n)), true), IntegerEntry(("Deposit_height_Of_" + n), 0), IntegerEntry("Staked_Amount", J), IntegerEntry(("Deposit_Amount_Of_" + n), 0), IntegerEntry(("Total_Lock_Blocks_Of_" + n), 0), StringEntry(("Lock_Status_Of_" + n), "UNLOCK"), IntegerEntry(("Rewards_Of_" + n), 0), IntegerEntry("Total_CODE_Claimed:", L)]
95+ }
96+
97+
98+@Verifier(M)
99+func N () = sigVerify(M.bodyBytes, M.proofs[0], M.senderPublicKey)
63100

github/deemru/w8io/169f3d6 
32.63 ms