Developers integrating with RenVM can implement a few different strategies to enhance user experience and create truly interoperable cryptocurrency applications.
Check out a hosted version of the app here.
When building smart contracts that interact with RenVM, you can use patterns to enable methods to be called via the OpenZeppelin Gas Station Network (GSN). The GSN is a decentralized solution for solving user onboarding to Ethereum applications. It allows dapps to pay for their users' transactions in a secure way, so users don’t need to hold ETH to pay for their gas or even set up an account.
One thing that developers can do to improve cross-chain user experience is to help users complete actions faster by using funds that have already been shifted. These funds can be accessed in a variety of trustful and trustless ways, however the goal is the same - facilitate a cross-chain transaction in a shorter time that it would take the user to first fully shift in an asset and then complete an action.
Deploy one of the adapter contracts in the /contracts
directory using the same owner address parameter as the wallet you plan fill transactions with.
Deposit shifted tokens to the adapter address through the deposit()
method. The adapter will use these funds to complete swaps faster when selected by the user via the UI. Please note: you'll need to approve the adapter contract on the shifted token contract before depositing.
justsmartcontracts.dev is an easy way to interact with smart contracts using just the contract address and ABI.
The adapter contract will also need to maintain an ETH balance with the GSN RelayHub. Gas fees paid by relay nodes will be refunded from this balance. To deposit funds, use the GSN dapp tool.
Create a .env
file at the root directory with the following variables and their real world values:
WALLET_ADDRESS=""
WALLET_KEY=""
ADAPTER_ADDRESS=""
In main terminal window run
npm install && npm start