Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit b9c3aa1

Browse files
authored
Update to use old drop contracts (#112)
1 parent 58f04d5 commit b9c3aa1

33 files changed

+7220
-25447
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,14 @@ abi:
2626
abi-gen --language Python -o thirdweb/abi --abis abi/IERC20.json && mv thirdweb/abi/ierc20/__init__.py thirdweb/abi/ierc20.py && rm -rf thirdweb/abi/ierc20
2727
abi-gen --language Python -o thirdweb/abi --abis abi/IERC721.json && mv thirdweb/abi/ierc721/__init__.py thirdweb/abi/ierc721.py && rm -rf thirdweb/abi/ierc721
2828
abi-gen --language Python -o thirdweb/abi --abis abi/IERC1155.json && mv thirdweb/abi/ierc1155/__init__.py thirdweb/abi/ierc1155.py && rm -rf thirdweb/abi/ierc1155
29-
abi-gen --language Python -o thirdweb/abi --abis abi/DropERC721.json && mv thirdweb/abi/drop_erc721/__init__.py thirdweb/abi/drop_erc721.py && rm -rf thirdweb/abi/drop_erc721
30-
abi-gen --language Python -o thirdweb/abi --abis abi/DropERC1155.json && mv thirdweb/abi/drop_erc1155/__init__.py thirdweb/abi/drop_erc1155.py && rm -rf thirdweb/abi/drop_erc1155
29+
abi-gen --language Python -o thirdweb/abi --abis abi/DropERC721_V3.json && mv thirdweb/abi/droperc721_v3/__init__.py thirdweb/abi/drop_erc721.py && rm -rf thirdweb/abi/droperc721_v3
30+
abi-gen --language Python -o thirdweb/abi --abis abi/DropERC1155_V2.json && mv thirdweb/abi/droperc1155_v2/__init__.py thirdweb/abi/drop_erc1155.py && rm -rf thirdweb/abi/droperc1155_v2
3131
abi-gen --language Python -o thirdweb/abi --abis abi/Multiwrap.json && mv thirdweb/abi/multiwrap/__init__.py thirdweb/abi/multiwrap.py && rm -rf thirdweb/abi/multiwrap
3232

3333
abi-gen --language Python -o thirdweb/abi --abis abi/SignatureMintERC20.json && mv thirdweb/abi/signature_mint_erc20/__init__.py thirdweb/abi/signature_mint_erc20.py && rm -rf thirdweb/abi/signature_mint_erc20
3434
abi-gen --language Python -o thirdweb/abi --abis abi/SignatureMintERC721.json && mv thirdweb/abi/signature_mint_erc721/__init__.py thirdweb/abi/signature_mint_erc721.py && rm -rf thirdweb/abi/signature_mint_erc721
3535
abi-gen --language Python -o thirdweb/abi --abis abi/SignatureMintERC1155.json && mv thirdweb/abi/signature_mint_erc1155/__init__.py thirdweb/abi/signature_mint_erc1155.py && rm -rf thirdweb/abi/signature_mint_erc1155
3636

37-
abi-gen --language Python -o thirdweb/abi --abis abi/ContractMetadataRegistry.json && mv thirdweb/abi/contract_metadata_registry/__init__.py thirdweb/abi/contract_metadata_registry.py && rm -rf thirdweb/abi/contract_metadata_registry
38-
abi-gen --language Python -o thirdweb/abi --abis abi/ThirdwebContract.json && mv thirdweb/abi/thirdweb_contract/__init__.py thirdweb/abi/thirdweb_contract.py && rm -rf thirdweb/abi/thirdweb_contract
39-
4037
abi-gen --language Python -o thirdweb/abi --abis abi/ITokenERC20.json && mv thirdweb/abi/i_token_erc20/__init__.py thirdweb/abi/i_token_erc20.py && rm -rf thirdweb/abi/i_token_erc20
4138
abi-gen --language Python -o thirdweb/abi --abis abi/ITokenERC721.json && mv thirdweb/abi/i_token_erc721/__init__.py thirdweb/abi/i_token_erc721.py && rm -rf thirdweb/abi/i_token_erc721
4239
abi-gen --language Python -o thirdweb/abi --abis abi/ITokenERC1155.json && mv thirdweb/abi/i_token_erc1155/__init__.py thirdweb/abi/i_token_erc1155.py && rm -rf thirdweb/abi/i_token_erc1155

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pip install thirdweb-sdk
2222
## Getting Started
2323

2424
To start using this SDK, you just need to pass in a provider configuration.
25+
2526
### Instantiating the SDK
2627

2728
Once you have all the necessary dependencies, you can follow the following setup steps to get started with the SDK read-only functions:
@@ -112,7 +113,7 @@ $ bash scripts/env/setup.sh
112113

113114
### Running Tests
114115

115-
Before running tests, make sure you've already run `poetry shell` and are in the poetry virutal environment with all dependencies installed.
116+
Before running tests, make sure you've already run `poetry shell` and are in the poetry virutal environment with all dependencies installed.
116117

117118
Once you have checked that this you have all the dependencies, you can run the following:
118119

@@ -134,15 +135,16 @@ If you're working in VSCode, there a few steps to get everything working with th
134135

135136
1. To setup poetry virtual environment inside your VSCode so it gets recognized as part of your project (import for linters), you can take the following steps from this [stack overflow answer](https://stackoverflow.com/questions/59882884/vscode-doesnt-show-poetry-virtualenvs-in-select-interpreter-option). You need to run `poetry config virtualenvs.in-project true` and then make sure you delete/create a new poetry env.
136137
2. In `.vscode/settings.json`, you should have the following:
138+
137139
```json
138140
{
139141
"python.linting.mypyEnabled": true,
140142
"python.linting.enabled": true,
141143
"python.linting.pylintEnabled": false
142144
}
143145
```
144-
3. Make sure to set your VSCode `Python: Interpreter` setting to the Python version inside your poetry virtual environment.
145146

147+
3. Make sure to set your VSCode `Python: Interpreter` setting to the Python version inside your poetry virtual environment.
146148

147149
### Generate Python ABI Wrappers
148150

@@ -155,6 +157,5 @@ $ npm install -g @0x/abi-gen
155157
Assuming you have the thirdweb contract ABIs in this directory at `/abi`, you can run the following command to generate the necessary ABIs.
156158

157159
```bash
158-
$ bash scripts/abi/generate.sh
160+
$ make abi
159161
```
160-

thirdweb/abi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from .ierc165 import IERC165
1010
from .ierc721 import IERC721
1111
from .ierc1155 import IERC1155
12-
from .drop_erc721 import DropERC721
13-
from .drop_erc1155 import DropERC1155
12+
from .drop_erc721 import DropERC721_V3
13+
from .drop_erc1155 import DropERC1155_V2
1414
from .contract_metadata_registry import ContractMetadataRegistry
1515
from .thirdweb_contract import ThirdwebContract
1616
from .i_platform_fee import IPlatformFee

0 commit comments

Comments
 (0)