Skip to content

Black linting - ENS #2509

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

Closed
wants to merge 7 commits into from
Closed
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
1,324 changes: 297 additions & 1,027 deletions ens/abis.py

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions ens/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
AUCTION_START_GAS_CONSTANT = 25000
AUCTION_START_GAS_MARGINAL = 39000

EMPTY_SHA3_BYTES = HexBytes(b'\0' * 32)
EMPTY_ADDR_HEX = HexAddress(HexStr('0x' + '00' * 20))
EMPTY_SHA3_BYTES = HexBytes(b"\0" * 32)
EMPTY_ADDR_HEX = HexAddress(HexStr("0x" + "00" * 20))

REVERSE_REGISTRAR_DOMAIN = 'addr.reverse'
REVERSE_REGISTRAR_DOMAIN = "addr.reverse"

ENS_MAINNET_ADDR = ChecksumAddress(HexAddress(HexStr('0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e')))
ENS_MAINNET_ADDR = ChecksumAddress(
HexAddress(HexStr("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"))
)


# --- interface ids --- #

GET_TEXT_INTERFACE_ID = HexStr("0x59d1d43c")
EXTENDED_RESOLVER_INTERFACE_ID = HexStr('0x9061b923') # ENSIP-10
EXTENDED_RESOLVER_INTERFACE_ID = HexStr("0x9061b923") # ENSIP-10
44 changes: 28 additions & 16 deletions ens/contract_data.py

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions ens/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class AddressMismatch(ValueError):
point to the address. This exception is raised if the name does
not currently point to the address.
"""

pass


Expand All @@ -18,6 +19,7 @@ class InvalidName(idna.IDNAError):

For example: names may not start with a dot, or include a space.
"""

pass


Expand All @@ -27,6 +29,7 @@ class UnauthorizedError(Exception):
you are trying to modify. Make sure to set ``from`` in the
``transact`` keyword argument to the owner of the name.
"""

pass


Expand All @@ -37,41 +40,47 @@ class UnownedName(Exception):
If working on a subdomain, make sure the subdomain gets created
first with :meth:`~ens.main.ENS.setup_address`.
"""

pass


class ResolverNotFound(Exception):
"""
Raised if no resolver was found for the name you are trying to resolve.
"""

pass


class UnsupportedFunction(Exception):
"""
Raised if a resolver does not support a particular method.
"""

pass


class BidTooLow(ValueError):
"""
Raised if you bid less than the minimum amount
"""

pass


class InvalidBidHash(ValueError):
"""
Raised if you supply incorrect data to generate the bid hash.
"""

pass


class InvalidLabel(ValueError):
"""
Raised if you supply an invalid label
"""

pass


Expand All @@ -82,6 +91,7 @@ class OversizeTransaction(ValueError):

For example: when you try to start too many auctions at once.
"""

pass


Expand All @@ -90,4 +100,5 @@ class UnderfundedBid(ValueError):
Raised if you send less wei with your bid than you declared
as your intent to bid.
"""

pass
Loading