Skip to content

Instantly share code, notes, and snippets.

@alexroan
Created June 18, 2020 09:23
Show Gist options
  • Save alexroan/65ee291c974e8919a6dbd7a9d791b0b1 to your computer and use it in GitHub Desktop.
Save alexroan/65ee291c974e8919a6dbd7a9d791b0b1 to your computer and use it in GitHub Desktop.
Exchange-outline.sol
contract Exchange {
//fill an order
function fillOrder(uint256 _id) public {
//...
}
//make order
function makeOrder(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive) public {
//...
}
//cancel order
function cancelOrder(uint256 _id) public returns (bool){
//...
}
//deposit erc20 tokens
function depositToken(address _tokenAddress, uint256 _amount) public {
//...
}
//withdraw erc20 tokens
function withdrawToken(address _tokenAddress, uint256 _amount) public {
//...
}
//deposit ether
function depositEther() public payable {
//...
}
//withdraw ether
function withdrawEther(uint256 _amount) public {
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment