tx · DwAi5TTSjjRECLqCoS149uSWifhTuBR9wvW3LoTFEk4Y

3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu:  -0.01400000 Waves

2020.01.03 14:10 [837598] smart account 3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu > SELF 0.00000000 Waves

{ "type": 13, "id": "DwAi5TTSjjRECLqCoS149uSWifhTuBR9wvW3LoTFEk4Y", "fee": 1400000, "feeAssetId": null, "timestamp": 1578049827605, "version": 1, "sender": "3NBTGfiEtHiKvpV84qrVpaqycizY8hGAxpu", "senderPublicKey": "7DERSZYEoBTSwaTrN1ktwnx1Y5D46mSpMSayUNs8CmcK", "proofs": [ "3Un6RxYzEoe7qjGyRVjYbgzk2U5bskPS6CmhpjHmqk5WQjm98YPHxvJB1V3RCkozt1kYd4AGSPpKneGvQAY7DEV4" ], "script": "base64:AAIDAAAAAAAAABAIARIFCgMBCAgSBQoDAQgIAAAABQAAAAAQZGFwcEFjb3VudFB1YktleQEAAAAgXEhEUm3PDwRAY2AliL4WiobL9+1WmvxN966h/S9Tg1gAAAAABnBhcjdJZAEAAAAgzlhA/ZjitMWTd+McxVJoK0GcLLGrEdV8aco355LpR4wAAAAABnVzZG5JZAEAAAAgImQ/Hr5gRukRahMT3KYz/hZ+B/l36bPyFfyZSSowCjcAAAAABWJ0Y0lkAQAAACC55z+qjxAm26PduiiTGHV+rQKiANia4ToJ1sVRNwsbjQAAAAAGZXVyb0lkAQAAACCSw5qKFqMqhCqerwy3G5JWNH0QK6GLgoZ1q6bNcyUwmwAAAAIAAAABaQEAAAAHZGVwb3NpdAAAAAMAAAAKY29tcGVTdGFydAAAAAJpZAAAAANudW0EAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAlwYXltZW50SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jd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UAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAAA5DYW4ndCB3aXRoZHJhdwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3R0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3R0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAN0dHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAANzdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANzdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADc3R4AAAAD3NlbmRlclB1YmxpY0tleQaxZ51P", "chainId": 84, "height": 837598, "spentComplexity": 0 } View: original | compacted Prev: 666nhzqpZk3qZCdfDL3QZdH2ArHb4VAgnAw8k6Mzev65 Next: none Diff:
OldNewDifferences
7171 case stx: SetScriptTransaction =>
7272 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
7373 case _ =>
74- false
74+ true
7575 }
7676
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
1414 @Callable(i)
1515 func deposit (compeStart,id,num) = {
1616 let pmt = extract(i.payment)
1717 let paymentId = pmt.assetId
1818 let currentKey = toBase58String(i.caller.bytes)
1919 let currentAmount = match getInteger(this, currentKey) {
2020 case a: Int =>
2121 a
2222 case _ =>
2323 0
2424 }
2525 let newAmount = (currentAmount + pmt.amount)
2626 WriteSet([DataEntry(((((id + "_") + num) + "_") + currentKey), newAmount), DataEntry(((((id + "_") + num) + "_compeStart_") + currentKey), compeStart)])
2727 }
2828
2929
3030
3131 @Callable(i)
3232 func withdraw (amount,id,num) = {
3333 let currentKey = toBase58String(i.caller.bytes)
3434 let compeStart = match getInteger(this, ((((id + "_") + num) + "_compeStart_") + currentKey)) {
3535 case a: Int =>
3636 a
3737 case _ =>
3838 0
3939 }
4040 let currentAmount = match getInteger(this, ((((id + "_") + num) + "_") + currentKey)) {
4141 case a: Int =>
4242 a
4343 case _ =>
4444 0
4545 }
4646 let newAmount = (currentAmount - amount)
4747 if ((lastBlock.timestamp > compeStart))
4848 then throw("Can't withdraw compe start")
4949 else if ((0 > amount))
5050 then throw("Can't withdraw negative amount")
5151 else if ((0 > newAmount))
5252 then throw("Not enough balance")
5353 else if ((id == "EtV3CXQ4wqm28WPB1KaBv5B9ke2bpXRZMutYNEJUQcXm"))
5454 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, par7Id)]))
5555 else if ((id == "3KFXBGGLCjA5Z2DuW4Dq9fDDrHjJJP1ZEkaoajSzuKsC"))
5656 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, usdnId)]))
5757 else if ((id == "DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn"))
5858 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, btcId)]))
5959 else if ((id == "AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"))
6060 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, euroId)]))
6161 else if ((id == "WAVES"))
6262 then ScriptResult(WriteSet([DataEntry((id + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
6363 else throw("Can't withdraw")
6464 }
6565
6666
6767 @Verifier(tx)
6868 func verify () = match tx {
6969 case ttx: TransferTransaction =>
7070 sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey)
7171 case stx: SetScriptTransaction =>
7272 sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey)
7373 case _ =>
74- false
74+ true
7575 }
7676

github/deemru/w8io/169f3d6 
47.97 ms