tx · 2RwacjcA1wUKv4o6Huo2fALbZEy6Zb9uLt8Cfd8zSBwy

3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu:  -0.01400000 Waves

2020.01.03 11:38 [837441] smart account 3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu > SELF 0.00000000 Waves

{ "type": 13, "id": "2RwacjcA1wUKv4o6Huo2fALbZEy6Zb9uLt8Cfd8zSBwy", "fee": 1400000, "feeAssetId": null, "timestamp": 1578040695874, "version": 1, "sender": "3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu", "senderPublicKey": "7DERSZYEoBTSwaTrN1ktwnx1Y5D46mSpMSayUNs8CmcK", "proofs": [ "3rUJQbpuymetN4cDgpZoyi8LHQM6DgkDWygWdTWoM7k4MTWuwxbhtVdfy4qYUwquJ1WgtdwSeNUzaRF4W7L2DhAN" ], "script": "base64:AAIDAAAAAAAAAA4IARIECgIBCBIECgIBCAAAAAUAAAAAEGRhcHBBY291bnRQdWJLZXkBAAAAIFxIRFJtzw8EQGNgJYi+FoqGy/ftVpr8Tfeuof0vU4NYAAAAAAZwYXI3SWQBAAAAIM5YQP2Y4rTFk3fjHMVSaCtBnCyxqxHVfGnKN+eS6UeMAAAAAAZ1c2RuSWQBAAAAICJkPx6+YEbpEWoTE9ymM/4Wfgf5d+mz8hX8mUkqMAo3AAAAAAVidGNJZAEAAAAguec/qo8QJtuj3bookxh1fq0CogDYmuE6CdbFUTcLG40AAAAABmV1cm9JZAEAAAAgksOaihajKoQqnq8MtxuSVjR9ECuhi4KGdaumzXMlMJsAAAACAAAAAWkBAAAAB2RlcG9zaXQAAAACAAAACmNvbXBlU3RhcnQAAAACaWQEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAA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JhdwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4BpuPdSo=", "chainId": 84, "height": 837441, "spentComplexity": 0 } View: original | compacted Prev: 52HjUoNyrWE2BexzZ5nPHhaUnjrXCguGJg24ZezoGgyr Next: 46iCj2Z6RXrW8xBqjAvVdvGPU57J97Lj3SaKWHFjwNMh Diff:
OldNewDifferences
1010 let btcId = base58'DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn'
1111
1212 let euroId = base58'AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ'
13-
14-let wavesId = base58'WAVES'
1513
1614 @Callable(i)
1715 func deposit (compeStart,id) = {
6159 else if ((id == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"))
6260 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
6361 else if ((id == "WAVES"))
64- then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, wavesId)]))
62+ then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
6563 else throw("Can't withdraw")
6664 }
6765
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'
13-
14-let wavesId = base58'WAVES'
1513
1614 @Callable(i)
1715 func deposit (compeStart,id) = {
1816 let pmt = extract(i.payment)
1917 let paymentId = pmt.assetId
2018 let currentKey = toBase58String(i.caller.bytes)
2119 let currentAmount = match getInteger(this, currentKey) {
2220 case a: Int =>
2321 a
2422 case _ =>
2523 0
2624 }
2725 let newAmount = (currentAmount + pmt.amount)
2826 WriteSet([DataEntry((id + currentKey), newAmount), DataEntry(((id + "compeStart") + currentKey), compeStart)])
2927 }
3028
3129
3230
3331 @Callable(i)
3432 func withdraw (amount,id) = {
3533 let currentKey = toBase58String(i.caller.bytes)
3634 let compeStart = match getInteger(this, ((id + "compeStart") + currentKey)) {
3735 case a: Int =>
3836 a
3937 case _ =>
4038 0
4139 }
4240 let currentAmount = match getInteger(this, (id + currentKey)) {
4341 case a: Int =>
4442 a
4543 case _ =>
4644 0
4745 }
4846 let newAmount = (currentAmount - amount)
4947 if ((lastBlock.timestamp > compeStart))
5048 then throw("Can't withdraw compe start")
5149 else if ((0 > amount))
5250 then throw("Can't withdraw negative amount")
5351 else if ((0 > newAmount))
5452 then throw("Not enough balance")
5553 else if ((id == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm"))
5654 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
5755 else if ((id == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"))
5856 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
5957 else if ((id == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn"))
6058 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
6159 else if ((id == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"))
6260 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
6361 else if ((id == "WAVES"))
64- then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, wavesId)]))
62+ then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
6563 else throw("Can't withdraw")
6664 }
6765
6866
6967 @Verifier(tx)
7068 func verify () = match tx {
7169 case _ =>
7270 true
7371 }
7472

github/deemru/w8io/026f985 
38.77 ms