Support Pallet Instances in Relay (#238)
* Sketch out how to support different bridge pallet instances * Create a common interface for using pallet instances * Start introducing generic instance parameter Attemps to make the compiler happy, but I'm having second thoughts about this approach. Commiting now as a way to have a checkpoint, but I think I'm going to need to re-consider my approach here. Ideally I want a change which introduces minimal changes, but this seems to be propagating around the codebase in ways I don't want. * Use trait objects instead of generics * Implement traits for Boxed trait objects This is done in order to statisfy trait bounds by types which use these new trait objects * Remove Clone usage for sync parameters * Remove implementation of Default for sync params * Require that BridgeInstance implements Debug * Ensure that BridgeInstance trait implements Send/Sync * Add documentation related to instances * Rust Fmt * Remove needless format * Make instance CLI option case insensitive * Replace `with_*` constructors with `new` * Clean up usage of instance structs * Enforce a default instance in the CLI params * Build sync params as we process input from CLI * Remove case insensitivity from sub-tx-mode I think this should happen, but maybe as part of a different PR * Process default Eth contract deployment config in CLI * Build EthereumExchangeParams in CLI * Process EthereumExchangeSubmitParams params in CLI
Showing
- bridges/relays/ethereum/src/cli.yml 11 additions, 0 deletionsbridges/relays/ethereum/src/cli.yml
- bridges/relays/ethereum/src/ethereum_deploy_contract.rs 23 additions, 24 deletionsbridges/relays/ethereum/src/ethereum_deploy_contract.rs
- bridges/relays/ethereum/src/ethereum_exchange.rs 29 additions, 21 deletionsbridges/relays/ethereum/src/ethereum_exchange.rs
- bridges/relays/ethereum/src/ethereum_exchange_submit.rs 18 additions, 23 deletionsbridges/relays/ethereum/src/ethereum_exchange_submit.rs
- bridges/relays/ethereum/src/ethereum_sync_loop.rs 45 additions, 49 deletionsbridges/relays/ethereum/src/ethereum_sync_loop.rs
- bridges/relays/ethereum/src/instances.rs 115 additions, 0 deletionsbridges/relays/ethereum/src/instances.rs
- bridges/relays/ethereum/src/main.rs 123 additions, 68 deletionsbridges/relays/ethereum/src/main.rs
- bridges/relays/ethereum/src/substrate_client.rs 24 additions, 44 deletionsbridges/relays/ethereum/src/substrate_client.rs
- bridges/relays/ethereum/src/substrate_sync_loop.rs 41 additions, 51 deletionsbridges/relays/ethereum/src/substrate_sync_loop.rs
- bridges/relays/ethereum/src/sync.rs 32 additions, 0 deletionsbridges/relays/ethereum/src/sync.rs
Please register or sign in to comment