This repository was archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathcontract.py
More file actions
86 lines (78 loc) · 1.9 KB
/
contract.py
File metadata and controls
86 lines (78 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from enum import Enum
from typing import TypeVar, Union
from thirdweb.abi import (
TWRegistry,
TWFactory,
TokenERC20,
TokenERC721,
TokenERC1155,
Marketplace,
IERC20,
IERC721,
IERC1155,
DropERC721,
DropERC1155,
DropERC20,
Multiwrap,
)
from thirdweb.abi.i_mintable_erc20 import IMintableERC20
from thirdweb.types.settings.metadata import ContractMetadataSchema
TContractABI = TypeVar(
"TContractABI",
bound=Union[
TokenERC721,
TokenERC1155,
TokenERC20,
Marketplace,
IERC20,
IERC721,
IERC1155,
TWRegistry,
TWFactory,
DropERC721,
DropERC1155,
DropERC20,
Multiwrap,
IMintableERC20
],
)
TERC721 = TypeVar("TERC721", bound=Union[TokenERC721, DropERC721, Multiwrap])
TERC1155 = TypeVar("TERC1155", bound=Union[TokenERC1155, DropERC1155])
TPrimarySaleABI = TypeVar(
"TPrimarySaleABI",
bound=Union[TokenERC721, TokenERC1155, TokenERC20, DropERC721, DropERC1155, DropERC20],
)
TPlatformFeeABI = TypeVar(
"TPlatformFeeABI",
bound=Union[
TokenERC721, TokenERC1155, TokenERC20, Marketplace, DropERC721, DropERC1155, DropERC20
],
)
TRoyaltyABI = TypeVar(
"TRoyaltyABI",
bound=Union[TokenERC721, TokenERC1155, DropERC721, DropERC1155, Multiwrap],
)
TMetadataABI = TypeVar(
"TMetadataABI",
bound=Union[
TokenERC721,
TokenERC1155,
TokenERC20,
Marketplace,
DropERC721,
DropERC1155,
DropERC20,
Multiwrap,
],
)
TContractSchema = TypeVar("TContractSchema", bound=ContractMetadataSchema)
class ContractType(Enum):
NFT_COLLECTION = "nft-collection"
EDITION = "edition"
TOKEN = "token"
TOKEN_DROP = "token-drop"
MARKETPLACE = "marketplace"
NFT_DROP = "nft-drop"
EDITION_DROP = "edition-drop"
MULTIWRAP = "multiwrap"
CUSTOM = "custom"