All of Ramp's contracts have code verified on etherscan available under the links below.
Escrow contracts are responsible for creating and releasing escrows in Ramp Instant. They use smart contracts provided by token sellers (Liquidity Pools) as sources for tokens that are locked when a new escrow is created.
Live smart contracts
- ETH: Mainnet 0x4F1247A044500AC44993595c6E950dc17aBa36c9
- ERC20: Mainnet 0x54e1EB00b7978314D33e0dbB113e745Eddd18FFe
- ETH: Rinkeby 0x42ccbdda29bb5acccc920fb9c59e70e022adc707
- ERC20: Rinkeby 0x711b986b62bd86ac067e6634583e8f544bc73873
There are three most important events exposed by the escrows smart contracts that you can track to follow the escrow lifecycle:
event Created(bytes32 indexed swapHash);: A new escrow was created.
event Released(bytes32 indexed swapHash);: A purchase was successfully completed, the tokens were sent to buyer.
event Returned(bytes32 indexed swapHash);: A purchase was not completed, tokens were returned to seller (liquidity pool).
Releasing assets to contract address
In situation where you want to send assets to a contract address instead of normal address, your contract should implement the appropriate
fallback function to do anything useful when receiving tokens. This function can't be too complex as we create release transaction with only little bit more gas than necessary to send to a normal address.
RampInstant[ETH|Token]Pool smart contract is deployed and controlled by token seller. Each
RampInstant[ETH|Token]Pool smart contract represents one asset type from one token seller.
- ETH pool: Rinkeby 0xc7e2e2832a20115b9bb15ef6cc5b299e68a2e8cc
- token (ERC20) pool: Rinkeby 0xe43926812be6a299f30f895ea0782f3d0e8e9905
Since RampInstantPool smart contracts are dynamic we cannot link to any specific address as it might be already closed.