Releases: ethchange/smart-exchange
Releases · ethchange/smart-exchange
Release 2.1.6
Release 2.1.5
- fixed bug, when identifiers contains only numbers
Release 2.1.4
- fixed sending value from main account to exchange contract on
exchange_transfer
Release 2.1.3
exchange_create
stops if namereg address doesn't have any code (prevents from accidentally deploying contract with testnet namereg address)
Release 2.1.2
- cheaper test namereg (
ICAPRegistrar
), which costs only 422659 gas
Release 2.1.1
- use only
280_000
gas to create contract instead of2_500_000
Release 2.1.0
- new
exchange_disown
method
Release 2.0.2
- use FixedFeeRegistrar instead of GlobalRegistrar
- mine at least 180 ETH
- fixed order of
reserve
andsetAddress
inexchange_create
which sometimes caused exchange to be created incorrectly.
Release 2.0.1
- Sleep 3.0.0
- fixed small bugs
Release 2.0.0
changes
-
exchange_transaction
should be queried with exchange 'identifier'. -
exchange_transaction
returns an array instead of object. -
exchange_transaction
request:-curl -X POST --data '{"id":8,"jsonrpc":"2.0","method":"exchange_transaction","params":["0xacf64bd586a847523086882c82c4cff6d77b1a753ea28c164046e37f3606583c", 0]}' -H "Content-Type: application/json" http://localhost:8545 +curl -X POST --data '{"id":8,"jsonrpc":"2.0","method":"exchange_transaction","params":["XROF", "0xacf64bd586a847523086882c82c4cff6d77b1a753ea28c164046e37f3606583c"]}' -H "Content-Type: application/json" http://localhost:8545
{ "id": 8, "jsonrpc": "2.0", "method": "exchange_transaction", "params": [ - "0xacf64bd586a847523086882c82c4cff6d77b1a753ea28c164046e37f3606583c", - 0 + "XROF", + "0xacf64bd586a847523086882c82c4cff6d77b1a753ea28c164046e37f3606583c" ] }
-
exchange_transaction
response:{ "jsonrpc": "2.0", "id": 8, - "result": { + "result": [{ "address": "0x9b173b6fab888af1b5eff49bf34c7aaebf58673f", "blockNumber": 55, "logIndex": 0, "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionHash": "0xacf64bd586a847523086882c82c4cff6d77b1a753ea28c164046e37f3606583c", "transactionIndex": 0, "event": "Deposit", "args": { "from": "0x275ac21e0b9383dcc0fa0fc4ecf7bf1ec7c4bba9", "to": "0x4d4152454b4f464b4b0000000000000000000000000000000000000000000000", "value": "15000" } -} +}] }
explanation
exchange transactions
are logs created by contracts and stored on the blockchain. Sometimes 1 transaction can create more than 1 log. eg. when we make IcapTransfer
to your own exchange. It produces IcapTransfer
and Deposit
event. That's why we need to return an array.