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

add support for bsc #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Inspired by [ape-safe](https://github.com/banteg/ape-safe) and Olymsig

## Supported Chains

Only supports Mainnet, Goerli and Arbitrum currently. If you'd like more to be supported, please make a PR.
Only supports Mainnet, Goerli, Arbitrum, and BSC currently. If you'd like more to be supported, please make a PR.

The only chains supported by Gnosis Safe API can be found [here](https://docs.safe.global/learn/safe-core/safe-core-api/available-services#safe-transaction-service).

Expand Down
5 changes: 5 additions & 0 deletions src/BatchScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ abstract contract BatchScript is Script, DelegatePrank {
chainId = chain.chainId;

// Set the Safe API base URL and multisend address based on chain
// Source of truth for urls: https://docs.safe.global/advanced/api-supported-networks
// Source of truth for addresses https://docs.safe.global/advanced/smart-account-supported-networks/v1.3.0
if (chainId == 1) {
SAFE_API_BASE_URL = "https://safe-transaction-mainnet.safe.global/api/v1/safes/";
SAFE_MULTISEND_ADDRESS = 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761;
Expand All @@ -153,6 +155,9 @@ abstract contract BatchScript is Script, DelegatePrank {
} else if (chainId == 43114) {
SAFE_API_BASE_URL = "https://safe-transaction-avalanche.safe.global/api/v1/safes/";
SAFE_MULTISEND_ADDRESS = 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761;
} else if (chainId == 56) {
SAFE_API_BASE_URL = "https://safe-transaction-bsc.safe.global/api/v1/safes/";
SAFE_MULTISEND_ADDRESS = 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761;
} else {
revert("Unsupported chain");
}
Expand Down