Skip to content

feat: ts fuel all events deployment scripts for e2e testing - #249

Merged
DenhamPreen merged 2 commits into
mainfrom
dp/fuel-ts-deployment-for-e2e-tests
Oct 22, 2024
Merged

DenhamPreen merged 2 commits into
mainfrom
dp/fuel-ts-deployment-for-e2e-tests

Conversation

@DenhamPreen

Copy link
Copy Markdown
Contributor

No description provided.

@DenhamPreen
DenhamPreen requested a review from JonoPrest October 3, 2024 19:26
@DenhamPreen
DenhamPreen force-pushed the dp/fuel-ts-deployment-for-e2e-tests branch 3 times, most recently from 4b548a5 to ad7e353 Compare October 3, 2024 19:31
@DenhamPreen
DenhamPreen enabled auto-merge (squash) October 3, 2024 19:32
@JonoPrest

Copy link
Copy Markdown
Collaborator

Hey @DenhamPreen, will need some comments and explanations please 🙏🏼

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env file for the seed phrase and conf for the network

Comment on lines +20 to +27
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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor to take the env vars

Comment on lines -37 to -38
let greeter_contract_id =
ContractId::from_str("0xb9bc445e5696c966dcf7e5d1237bd03c04e3ba6929bdaedfeebc7aae784c3a0b")?;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is commented out, same as below as it's clearly left from running the script at some point.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove it if it's not useful?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed, it's in the git history if @DZakh you still need it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these src/contract files are autogened from the contract abi, cmd is in the readme to gen

@JonoPrest JonoPrest Oct 7, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we hide them from git if they are generated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typescript deployment script

@DenhamPreen

Copy link
Copy Markdown
Contributor Author

PR made as the rust clients don't work on a certain network

Comment on lines +75 to +81
// 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?;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the println! below will get the wrong intended value for the variable r since it was being shadowed

@JonoPrest JonoPrest left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DenhamPreen

Copy link
Copy Markdown
Contributor Author

Thanks for your feedback @JonoPrest, I'll address and get back to this when I have a chance

@DenhamPreen

Copy link
Copy Markdown
Contributor Author

Hmm.. Something went weird here with the rebase. I'm not sure why this happens but have seen it before.

@DenhamPreen
DenhamPreen force-pushed the dp/fuel-ts-deployment-for-e2e-tests branch from b31f210 to dc3f55e Compare October 22, 2024 05:25
@DenhamPreen
DenhamPreen merged commit aa5492f into main Oct 22, 2024
@DenhamPreen
DenhamPreen deleted the dp/fuel-ts-deployment-for-e2e-tests branch October 22, 2024 05:25
DenhamPreen added a commit that referenced this pull request Oct 22, 2024
@DenhamPreen

Copy link
Copy Markdown
Contributor Author

I don't understand how this just merged. I did not merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants