Skip to content

AugurProject/gnosis-py

This branch is 13 commits ahead of, 1370 commits behind safe-global/safe-eth-py:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1cd3bc5 · Feb 27, 2020
Nov 20, 2019
Feb 27, 2020
Feb 8, 2019
Oct 25, 2019
Feb 11, 2020
Aug 30, 2018
Jul 22, 2019
May 8, 2019
Jan 9, 2019
Aug 30, 2018
Apr 4, 2019
Feb 26, 2020
Feb 26, 2020
Jan 9, 2019
Jan 9, 2019
Feb 26, 2020

Repository files navigation

Django Ethereum (gnosis-py)

Travis CI build Coveralls Python 3.7 Django 2.2 Pypi package

Gnosis-py includes a set of libraries to work with Gnosis projects. Currently Gnosis Safe is supported.

Quick start

Just run pip install gnosis-py or add it to your requirements.txt

Ethereum utils

gnosis.eth

  • 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. Only http/https urls are suppored for the node url.

gnosis.eth.constants

  • NULL_ADDRESS (0x000...0)
  • SENTINEL_ADDRESS (0x000...1)
  • Maximum an minimum values for R, S and V in ethereum signatures

gnosis.eth.utils

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.

Ethereum django utils

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

Contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.7%
  • Shell 0.3%