Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

lowercase-only address #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Sample output:

## Contract-backed trade functions

This section will explain the required process for placing an order, filling a trade, cancelling an order, or making a withdrawal. Each function requires a signature using the private key associated with the address you want to interact with. When hashing input to be signed, you will always hash all the arguments using sha3 (keccak256), prefix the ASCII encoded message `\x19Ethereum Signed Message:\n32` to the hash, then hash the resulting data once more with sha3. The final hash is ready to be signed and sent to the server to be dispatched to the contract. All signatures must be in the `{ v, r, s }` form where `v` is a Number type between 27 and 28, and `r` and `s` are both hex strings with the standard 0x prefix.
This section will explain the required process for placing an order, filling a trade, cancelling an order, or making a withdrawal. Each function requires a signature using the private key associated with the address you want to interact with. Addresses must be lowercase-only. When hashing input to be signed, you will always hash all the arguments using sha3 (keccak256), prefix the ASCII encoded message `\x19Ethereum Signed Message:\n32` to the hash, then hash the resulting data once more with sha3. The final hash is ready to be signed and sent to the server to be dispatched to the contract. All signatures must be in the `{ v, r, s }` form where `v` is a Number type between 27 and 28, and `r` and `s` are both hex strings with the standard 0x prefix.

The types of data to be hashed will always be `address`, `uint256`, or `bytes32`. Address types will always be left-padded to 160-bits, and number types will always be left-padded to `uint256`. bytes32 types will use the intuitive width of 256-bits. For easy-to-use hash functions we recommend using web3-utils for its `soliditySha3` function ([docs here](https://web3js.readthedocs.io/en/1.0/web3-utils.html#soliditysha3)), and for automatically salting your hash you can make use of ethereumjs-util for its `hashPersonalMessage` function ([docs here](https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md)). As long as the instructions are followed you can use any standard sha3 library for any language.

Expand Down