Time to read: 1 min
RIF Relay Deployment
Set Up RIF Relay Contracts and Server
Deploy Contracts
Start by deploying on-chain components. All tools needed are in the RIF Relay Contract repository
Regtest
- Clone the Repository:
git clone https://github.com/rsksmart/rif-relay-contracts
- Navigate to the directory and install dependencies:
cd rif-relay-contracts
npm install
- Deploy the contract:
npx hardhat deploy --network regtest
This uses the Regtest configuration from
hardhat.config.ts
.
After deployment, you'll see a summary of the deployed contracts. This summary includes the on-chain components essential for RIF Relay, and additional contracts for testing and validation purposes.
┌───────────────────────────────────────┬─── ───────────────────────────────────────────┐
│ (index) │ Values │
├───────────────────────────────────────┼──────────────────────────────────────────────┤
│ Penalizer │ '0x77045E71a7A2c50903d88e564cD72fab11e82051' │
│ RelayHub │ '0xDA7Ce79725418F4F6E13Bf5F520C89Cec5f6A974' │
│ SmartWallet │ '0x83C5541A6c8D2dBAD642f385d8d06Ca9B6C731ee' │
│ SmartWalletFactory │ '0xE0825f57Dd05Ef62FF731c27222A86E104CC4Cad' │
│ DeployVerifier │ '0x73ec81da0C72DD112e06c09A6ec03B5544d26F05' │
│ RelayVerifier │ '0x03F23ae1917722d5A27a2Ea0Bcc98725a2a2a49a' │
│ CustomSmartWallet │ '0x1eD614cd3443EFd9c70F04b6d777aed947A4b0c4' │
│ CustomSmartWalletFactory │ '0x5159345aaB821172e795d56274D0f5FDFdC6aBD9' │
│ CustomSmartWalletDeployVerifier │ '0x7557fcE0BbFAe81a9508FF469D481f2c72a8B5f3' │
│ CustomSmartWalletRelayVerifier │ '0x0e19674ebc2c2B6Df3e7a1417c49b50235c61924' │
│ NativeHolderSmartWallet │ '0x4aC9422c7720eF71Cb219B006aB363Ab54BB4183' │
│ NativeHolderSmartWalletFactory │ '0xBaDb31cAf5B95edd785446B76219b60fB1f07233' │
│ NativeHolderSmartWalletDeployVerifier │ '0xAe59e767768c6c25d64619Ee1c498Fd7D83e3c24' │
│ NativeHolderSmartWalletRelayVerifier │ '0x5897E84216220663F306676458Afc7bf2A6A3C52' │
│ UtilToken │ '0x1Af2844A588759D0DE58abD568ADD96BB8B3B6D8' │
│ VersionRegistry │ '0x8901a2Bbf639bFD21A97004BA4D7aE2BD00B8DA8' │
└───────────────────────────────────────┴──────────────────────────────────────────────┘
The deployment summary shows two sets of Smart Wallets, each paired with its verifiers. This is because the verifier is used for both deployment and transaction validation. For testing purposes, the focus will be on using these Smart Wallet Contracts.
Testnet
- Ensure your account is funded. You can get funds from the tRBTC Faucet.
- Deploy on Testnet:
npx hardhat deploy --network testnet
Remember to configure Testnet in
hardhat.config.ts
. Existing RIF Relay contracts deployed on Testnet can be found in the contracts section.