feat: ts fuel all events deployment scripts for e2e testing - #249
Conversation
4b548a5 to
ad7e353
Compare
|
Hey @DenhamPreen, will need some comments and explanations please 🙏🏼 |
There was a problem hiding this comment.
env file for the seed phrase and conf for the network
| let provider_url = env::var("PROVIDER_URL").expect("PROVIDER must be set in .env"); | ||
| let base_asset_address = env::var("BASE_ASSET_ADDRESS").expect("BASE_ASSET_ADDRESS must be set in .env"); | ||
|
|
||
| let provider = Provider::connect(provider_url).await.unwrap(); | ||
|
|
||
| let wallet = WalletUnlocked::new_from_mnemonic_phrase(&phrase, Some(provider.clone())).unwrap(); | ||
| let base_asset_id = | ||
| AssetId::from_str("0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07") | ||
| AssetId::from_str(&base_asset_address) |
There was a problem hiding this comment.
refactor to take the env vars
| let greeter_contract_id = | ||
| ContractId::from_str("0xb9bc445e5696c966dcf7e5d1237bd03c04e3ba6929bdaedfeebc7aae784c3a0b")?; |
There was a problem hiding this comment.
This is commented out, same as below as it's clearly left from running the script at some point.
There was a problem hiding this comment.
Should we just remove it if it's not useful?
There was a problem hiding this comment.
removed, it's in the git history if @DZakh you still need it
There was a problem hiding this comment.
All these src/contract files are autogened from the contract abi, cmd is in the readme to gen
There was a problem hiding this comment.
Should we hide them from git if they are generated?
There was a problem hiding this comment.
typescript deployment script
|
PR made as the rust clients don't work on a certain network |
| // let r = contract_methods | ||
| // .withdraw(wallet.address().into()) | ||
| // .call_params(call_params)? | ||
| // .with_variable_output_policy(VariableOutputPolicy::Exactly(1)) | ||
| // .with_contract_ids(&[greeter_contract_id.into()]) | ||
| // .call() | ||
| // .await?; |
There was a problem hiding this comment.
Looks like the println! below will get the wrong intended value for the variable r since it was being shadowed
JonoPrest
left a comment
There was a problem hiding this comment.
Cool @DenhamPreen,
Could you just get back to the comments/questions before merge?
I'm not sure if we should if we should be committing generated code.
Tagging @DZakh here for when he gets back.
|
Thanks for your feedback @JonoPrest, I'll address and get back to this when I have a chance |
|
Hmm.. Something went weird here with the rebase. I'm not sure why this happens but have seen it before. |
b31f210 to
dc3f55e
Compare
|
I don't understand how this just merged. I did not merge it |
No description provided.