0.0.1 • Published 2 years ago
@waveshq/state-relayer-bot v0.0.1
DeFiChain <-> DeFiMetaChain State Relayer
A project comprising of smart contracts and scripts to port certain information from DeFiChain to DeFiMetaChain
Directory Structure
├── bot // <-- Logic for the bot + integration test
├── contracts // <- The smart contracts + example solidity usage
├── scripts // <- Deployment scripts + gas estimation
├── tests // <- Smart contract tests
├── containers // <- Containers for integration tests
How to use the package to update information on DeFiMetaChain
import {handler} from "@waveshq/state-relayer-bot";
import { EnvironmentNetwork } from "@waveshq/walletkit-core"
handler({
testGasCost: false,
urlNetwork: "https://ocean.defichain.com/",
envNetwork: EnvironmentNetwork.MainNet,
contractAddress: /* YOUR STATE RELAYER PROXY ADDRESS */,
signer: /* signer object */,
gasUpdateDEX: /* gas limit for dex update transaction */,
gasUpdateMaster: /* gas limit for master node update transaction */,
gasUpdateVault: /* gas limit for vault update transaction */
})
Instruction to consume the smart contract information
Examples on how to consume the information exposed by the smart contract is showcased via this folder and this folder
How to deploy your smart contract on DMCTestnet
Install the dependencies and compile smart contracts:
npm ci
npx hardhat compile
- If you use .env file, just execute this:
npx hardhat run --network DMCTestnet scripts/deployment.ts
- If you want to use Ledger, comment the accounts line and uncomment the ledgerAccounts line under DMCTestnet section. Execute this command:
npx hardhat run --network DMCTestnet scripts/deployment.ts
0.0.1
2 years ago
0.0.0-beta.6
2 years ago
0.0.0-beta.5
2 years ago
0.0.0-beta.3
2 years ago
0.0.0-beta.4
2 years ago
0.0.0-beta.2
2 years ago
0.0.0
2 years ago