Skip to content

Commit 6afa1d7

Browse files
committed
feat: add fantom support
1 parent 734519f commit 6afa1d7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ape_safe.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616

1717

1818
MULTISEND_CALL_ONLY = '0x40A2aCCbd92BCA938b02010E17A5b8929b49130D'
19+
multisends = {
20+
250: '0x10B62CC1E8D9a9f1Ad05BCC491A7984697c19f7E',
21+
}
1922
transaction_service = {
2023
1: 'https://safe-transaction.mainnet.gnosis.io',
2124
4: 'https://safe-transaction.rinkeby.gnosis.io',
2225
5: 'https://safe-transaction.goerli.gnosis.io',
2326
56: 'https://safe-transaction.bsc.gnosis.io',
2427
100: 'https://safe-transaction.xdai.gnosis.io',
2528
137: 'https://safe-transaction.polygon.gnosis.io',
29+
250: 'https://safe.fantom.network',
2630
246: 'https://safe-transaction.ewc.gnosis.io',
2731
42161: 'https://safe-transaction.arbitrum.gnosis.io',
2832
73799: 'https://safe-transaction.volta.gnosis.io',
@@ -39,16 +43,15 @@ class ApiError(Exception):
3943

4044
class ApeSafe(Safe):
4145

42-
def __init__(self, address, base_url=None, multisend=MULTISEND_CALL_ONLY):
46+
def __init__(self, address, base_url=None, multisend=None):
4347
"""
4448
Create an ApeSafe from an address or a ENS name and use a default connection.
4549
"""
4650
if not web3.isChecksumAddress(address):
4751
address = web3.ens.resolve(address)
4852
ethereum_client = EthereumClient(web3.provider.endpoint_uri)
49-
self.multisend = multisend
50-
if base_url is None:
51-
self.base_url = transaction_service[chain.id]
53+
self.base_url = base_url or transaction_service[chain.id]
54+
self.multisend = multisend or multisends.get(chain.id, MULTISEND_CALL_ONLY)
5255
super().__init__(address, ethereum_client)
5356

5457
def __str__(self):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ape-safe"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
description = "Build complex Gnosis Safe transactions and safely preview them in a forked environment."
55
authors = ["banteg <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)