tx · 6LJxxk9LVmZM637kDQsjgL9UbVmxwWaRtbYW1k4SSotp

3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW:  -0.01400000 Waves

2020.01.04 03:04 [838393] smart account 3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW > SELF 0.00000000 Waves

{ "type": 13, "id": "6LJxxk9LVmZM637kDQsjgL9UbVmxwWaRtbYW1k4SSotp", "fee": 1400000, "feeAssetId": null, "timestamp": 1578096252662, "version": 1, "sender": "3MyV9Fm9cwW9W68VCGfPvejLujx7xVpJiKW", "senderPublicKey": "8zVjiVAuhkkAyQsSHHvjkNNoN8WDKJAEBV5nSpiyyYWr", "proofs": [ "31dcPdz3E7BDfA1apquNyEMXR3GtTTZzxR8peLEdMAmmHow1So8SWTMjctAqzrSxViwftkqZY21pZ86P7ECRFCcx" ], "script": "base64:AAIDAAAAAAAAAA4IARIECgIBCBIECgIBCAAAAAYAAAAAEGRhcHBBY291bnRQdWJLZXkBAAAAIFxIRFJtzw8EQGNgJYi+FoqGy/ftVpr8Tfeuof0vU4NYAAAAAAZwYXI3SWQBAAAAIM5YQP2Y4rTFk3fjHMVSaCtBnCyxqxHVfGnKN+eS6UeMAAAAAAZ1c2RuSWQBAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3AAAAAAVidGNJZAEAAAAguec/qo8QJtuj3bookxh1fq0CogDYmuE6CdbFUTcLG40AAAAABmV1cm9JZAEAAAAgksOaihajKoQqnq8MtxuSVjR9ECuhi4KGdaumzXMlMJsAAAAACGNvbXBlTnVtAgAAAAYxMTExMTEAAAACAAAAAWkBAAAAB2RlcG9zaXQAAAACAAAACmNvbXBlU3RhcnQAAAACaWQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2F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spentComplexity": 0 } View: original | compacted Prev: GjNKi1PG2RNBCNwvQnYG8hY5R65nXmd6im3r3Yda6LNx Next: 6DEjRXmCMd8DYiZqmQA4WsQAXF6756XS61FVBcgFXkGB Diff:
OldNewDifferences
1111
1212 let euroId = base58'AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ'
1313
14+let compeNum = "111111"
15+
1416 @Callable(i)
1517 func deposit (compeStart,id) = {
1618 let pmt = extract(i.payment)
2325 0
2426 }
2527 let newAmount = (currentAmount + pmt.amount)
26- WriteSet([DataEntry(((id + "_") + currentKey), newAmount), DataEntry((((id + "_") + "_compeStart_") + currentKey), compeStart)])
28+ WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount), DataEntry(((((id + "_compeStart_") + compeNum) + "_") + currentKey), compeStart)])
2729 }
2830
2931
3133 @Callable(i)
3234 func withdraw (amount,id) = {
3335 let currentKey = toBase58String(i.caller.bytes)
34- let compeStart = match getInteger(this, (((id + "_") + "_compeStart_") + currentKey)) {
36+ let compeStart = match getInteger(this, ((((id + "_compeStart_") + compeNum) + "_") + currentKey)) {
3537 case a: Int =>
3638 a
3739 case _ =>
3840 0
3941 }
40- let currentAmount = match getInteger(this, ((id + "_") + currentKey)) {
42+ let currentAmount = match getInteger(this, ((((id + "_") + compeNum) + "_") + currentKey)) {
4143 case a: Int =>
4244 a
4345 case _ =>
5153 else if ((0 > newAmount))
5254 then throw("Not enough balance")
5355 else if ((id == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm"))
54- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
56+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
5557 else if ((id == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"))
56- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
58+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
5759 else if ((id == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn"))
58- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
60+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
5961 else if ((id == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"))
60- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
62+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
6163 else if ((id == "WAVES"))
62- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
64+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
6365 else throw("Can't withdraw")
6466 }
6567
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let dappAcountPubKey = base58'7DERSZYEoBTSwaTrN1ktwnx1Y5D46mSpMSayUNs8CmcK'
55
66 let par7Id = base58'EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm'
77
88 let usdnId = base58'3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC'
99
1010 let btcId = base58'DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn'
1111
1212 let euroId = base58'AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ'
1313
14+let compeNum = "111111"
15+
1416 @Callable(i)
1517 func deposit (compeStart,id) = {
1618 let pmt = extract(i.payment)
1719 let paymentId = pmt.assetId
1820 let currentKey = toBase58String(i.caller.bytes)
1921 let currentAmount = match getInteger(this, currentKey) {
2022 case a: Int =>
2123 a
2224 case _ =>
2325 0
2426 }
2527 let newAmount = (currentAmount + pmt.amount)
26- WriteSet([DataEntry(((id + "_") + currentKey), newAmount), DataEntry((((id + "_") + "_compeStart_") + currentKey), compeStart)])
28+ WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount), DataEntry(((((id + "_compeStart_") + compeNum) + "_") + currentKey), compeStart)])
2729 }
2830
2931
3032
3133 @Callable(i)
3234 func withdraw (amount,id) = {
3335 let currentKey = toBase58String(i.caller.bytes)
34- let compeStart = match getInteger(this, (((id + "_") + "_compeStart_") + currentKey)) {
36+ let compeStart = match getInteger(this, ((((id + "_compeStart_") + compeNum) + "_") + currentKey)) {
3537 case a: Int =>
3638 a
3739 case _ =>
3840 0
3941 }
40- let currentAmount = match getInteger(this, ((id + "_") + currentKey)) {
42+ let currentAmount = match getInteger(this, ((((id + "_") + compeNum) + "_") + currentKey)) {
4143 case a: Int =>
4244 a
4345 case _ =>
4446 0
4547 }
4648 let newAmount = (currentAmount - amount)
4749 if ((lastBlock.timestamp > compeStart))
4850 then throw("Can't withdraw compe start")
4951 else if ((0 > amount))
5052 then throw("Can't withdraw negative amount")
5153 else if ((0 > newAmount))
5254 then throw("Not enough balance")
5355 else if ((id == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm"))
54- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
56+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
5557 else if ((id == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"))
56- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
58+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
5759 else if ((id == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn"))
58- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
60+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
5961 else if ((id == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"))
60- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
62+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
6163 else if ((id == "WAVES"))
62- then ScriptResult(WriteSet([DataEntry(((id + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
64+ then ScriptResult(WriteSet([DataEntry(((((id + "_") + compeNum) + "_") + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
6365 else throw("Can't withdraw")
6466 }
6567
6668
6769 @Verifier(tx)
6870 func verify () = match tx {
6971 case ttx: TransferTransaction =>
7072 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
7173 case stx: SetScriptTransaction =>
7274 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
7375 case _ =>
7476 true
7577 }
7678

github/deemru/w8io/169f3d6 
124.76 ms