From 59b5dca3356df7267d49f3b971bfb90ae1d6bc53 Mon Sep 17 00:00:00 2001 From: Mat Milbury Date: Tue, 19 Mar 2024 09:58:48 +0100 Subject: [PATCH] add support for bsc --- README.md | 2 +- src/BatchScript.sol | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d990e59..c63bae8 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/src/BatchScript.sol b/src/BatchScript.sol index feb7fe7..151ee92 100644 --- a/src/BatchScript.sol +++ b/src/BatchScript.sol @@ -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; @@ -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"); }