Gnosis-py includes a set of libraries to work with Gnosis projects. Currently Gnosis Safe is supported.
Just run pip install gnosis-py
or add it to your requirements.txt
class EthereumClient (ethereum_node_url: str)
: Class to connect and do operations with a ethereum node. Uses web3 and raw rpc calls for things not supported in web3. Onlyhttp/https
urls are suppored for the node url.
NULL_ADDRESS (0x000...0)
SENTINEL_ADDRESS (0x000...1)
- Maximum an minimum values for R, S and V in ethereum signatures
Contains utils for ethereum operations:
get_eth_address_with_key() -> Tuple[str, bytes]
: Returns a tuple of a valid public ethereum checksumed address with the private key.get_eth_address_with_invalid_checksum() -> str
: Returns an invalid checksumed ethereum public address.generate_address_2(from_: Union[str, bytes], salt: Union[str, bytes], init_code: [str, bytes]) -> str
: Calculates the address of a new contract created using the new CREATE2 opcode.
Now django-eth
is part of this package, available under gnosis.eth.django
You can find a set of helpers for working with Ethereum using Django and Django Rest framework.
It includes:
- Basic serializers (signature, transaction)
- Serializer fields (Ethereum address field, hexadecimal field)
- Model fields (Ethereum address, Ethereum big integer field)
- Utils for testing
- Denís Graña ([email protected])
- Giacomo Licari ([email protected])
- Uxío Fuentefría ([email protected])