Skip to content
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

feat: test Safe on Sepolia & Pimlico #20

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

chris13524
Copy link
Member

@chris13524 chris13524 commented Sep 11, 2024

Tests the Safe code against Sepolia and Pimlico

E.g. transaction: https://sepolia.etherscan.io/address/0x07422e736d74dbb0b666cb9dbd6424d9173f183d#internaltx

Screenshot 2024-09-11 at 13 41 52 Screenshot 2024-09-11 at 13 42 03

@chris13524 chris13524 self-assigned this Sep 11, 2024
Copy link
Contributor

@jackpooleywc jackpooleywc left a comment

Choose a reason for hiding this comment

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

:shipit:

README.md Show resolved Hide resolved
Comment on lines 453 to 478
async fn use_faucet(
provider: ReqwestProvider,
faucet: LocalSigner<SigningKey>,
amount: U256,
to: Address,
) -> eyre::Result<()> {
// Basic check (which we can tune) to make sure we don't use excessive
// amounts (e.g. 0.1) of test ETH. It is not infinite, so we should use
// the minimum amount necessary.
assert!(amount < U256::from(20), "You probably don't need that much");

ProviderBuilder::new()
.with_recommended_fillers()
.wallet(EthereumWallet::new(faucet))
.on_provider(provider.clone())
.send_transaction(
TransactionRequest::default().with_to(to).with_value(amount),
)
.await?
.watch()
.await?;
let balance = provider.get_balance(to).await?;
assert_eq!(balance, amount);

Ok(())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! we should share this with all tests I think 💯

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah welcome to use it!

@chris13524 chris13524 merged commit 71bf6bc into feat/7702-safe Sep 12, 2024
3 checks passed
@chris13524 chris13524 deleted the feat/safe-pimlico-sepolia branch September 12, 2024 15:23
chris13524 added a commit that referenced this pull request Sep 12, 2024
* feat: 7702 safe

* chore: rebase

* chore: more effort

* chore: fix submodule URL

* fix: remove platform

* feat: test Safe on Sepolia & Pimlico (#20)

* feat: test Safe against Sepolia and Sepolia

* chore: comment

* chore: prefer assert

* chore: add missing deps

* chore: Safe Swift refactor (#21)
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