-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping func/subxt #4
Conversation
ocdbytes
commented
Jun 10, 2024
- added genesis state declarations.
- updated with declareV0 call.
- updated the tests.
Readme.md
Outdated
the **Token Bridge** & **Eth Bridge** contract | ||
between a madara/katana appchain and | ||
another L2 or L1 network. It will also declare wallet | ||
contracts from **OpenZappeline**, **Argent** and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contracts from **OpenZappeline**, **Argent** and | |
contracts from **OpenZeppelin**, **Argent** and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not fixed
src/contract_clients/subxt_funcs.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can delete this
src/contract_clients/init_state.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this file and break it to smaller parts as discusssed
src/contract_clients/token_bridge.rs
Outdated
|
||
let deploy_tx = account | ||
|
||
let token_bridge_class_hash = declare_contract_middleware(DeclarationInput::DeclarationInputs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't really a middleware, more like a util
src/utils/mapper.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can delete this
Readme.md
Outdated
Madara Bootstarp is a tool that helps to deploy | ||
the **Token Bridge** & **Eth Bridge** contract | ||
between a madara/katana appchain and | ||
another L2 or L1 network. It will also declare wallet | ||
contracts from **OpenZappelin**, **Argent** and | ||
**Braavos**. You can find the full list of contracts | ||
in [Info](#info-ℹ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the number of words per line seem to be very low no?
Readme.md
Outdated
the **Token Bridge** & **Eth Bridge** contract | ||
between a madara/katana appchain and | ||
another L2 or L1 network. It will also declare wallet | ||
contracts from **OpenZappeline**, **Argent** and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not fixed
src/bridge/deploy_eth_bridge.rs
Outdated
save_to_json("l2_eth_address", &JsonValueType::StringType(eth_address.to_string()))?; | ||
log::info!("L2 ETH Token Deployment Successful [✅]"); | ||
log::info!("[🚀] L2 ETH Token Address : {:?}", eth_address); | ||
// save_to_json("l2_eth_address", &JsonValueType::StringType(eth_address.to_string()))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
src/main.rs
Outdated
pub l2_erc20_token_address: FieldElement, | ||
} | ||
|
||
pub async fn deploy_bridges(config: &CliArgs) -> DeployBridgeOutput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub async fn deploy_bridges(config: &CliArgs) -> DeployBridgeOutput { | |
pub async fn bootstrap(config: &CliArgs) -> DeployBridgeOutput { |
.github/workflows/linters.yml
Outdated
# markdown-lint: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: avto-dev/markdown-lint@v1 | ||
# with: | ||
# config: "./.markdownlint.json" | ||
# args: "." | ||
# ignore: "./target" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's uncomment this?
src/contract_clients/utils.rs
Outdated
rpc, | ||
signer, | ||
account_address, | ||
FieldElement::from_hex_be("0x4d4144415241").unwrap(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't hardcode this
src/contract_clients/utils.rs
Outdated
} | ||
|
||
#[allow(private_interfaces)] | ||
pub async fn declare_contract_util_func(input: DeclarationInput<'_>) -> FieldElement { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub async fn declare_contract_util_func(input: DeclarationInput<'_>) -> FieldElement { | |
pub async fn declare_contract(input: DeclarationInput<'_>) -> FieldElement { |
src/setup_scripts/account_setup.rs
Outdated
use crate::utils::{convert_to_hex, save_to_json, JsonValueType}; | ||
use crate::CliArgs; | ||
|
||
pub async fn account_init_func<'a>(clients: &'a Config, arg_config: &'a CliArgs) -> RpcAccount<'a> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub async fn account_init_func<'a>(clients: &'a Config, arg_config: &'a CliArgs) -> RpcAccount<'a> { | |
pub async fn account_init<'a>(clients: &'a Config, arg_config: &'a CliArgs) -> RpcAccount<'a> { |
let braavos_class_hash = declare_contract_util_func(DeclarationInput::DeclarationInputs( | ||
String::from(BRAAVOS_ACCOUNT_SIERRA_PATH), | ||
String::from(BRAAVOS_ACCOUNT_CASM_PATH), | ||
self.account.clone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to clone, can we pass a ref?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't gives error. If it would be possible clippy me aa jaega