Skip to content

Commit 9a7a4bc

Browse files
authored
Fix sdk bugs, remove tx_overrides, merge main (#131)
* updated roles/permission doc (#115) * swagger UI on Production gives a 404 (#116) * fixed nodemon & retry to not update mined status, let the other process handle it (#117) * Retry Fixes (#123) * updated retry to not retry if gas value is lower than previously sent. Dynamic Wallet Add doesn't work. Will be fixed in Adam/Furqans branch * updated log to warn & updated message * Testjam error fixes (#124) * fixed Jorge worker error * readme update for swagger UI for Docker Image * added examples for end-points * enabled swagger UI on production (#127) * fix for adding wallets dynamically for a new chain (#128) * Updated sdk to 3.10.60 & used retry var (#129) * Fix prebuilt merge conflicts * Remove dbOperations
1 parent 108024c commit 9a7a4bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+160
-75
lines changed

docs/UserGuide.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
1. Create a `.env` file based off `.env.example` with all the variables filled in.
2323
2. Update the `THIRDWEB_API_SECRET_KEY` value on the `.env` file
24+
3. Update the `POSTGRES_CONNECTION_URL` value on the `.env` file
2425

2526
### PostgreSQL DB
2627

@@ -79,9 +80,18 @@ For updates on your requests, you can either poll using the `get` (`/tranasction
7980
3. Run the below command
8081
<br />
8182
```
82-
docker run -e .env -p 3005:3005 thirdweb/web3-api:latest
83+
docker run -e .env -p 3005:3005 thirdweb/web3-api:nightly
84+
# check other images at https://hub.docker.com/r/thirdweb/web3-api/tags
8385
```
8486

87+
### Note:
88+
89+
To access the Swagger UI locally on `http://localhost:3005/` when using the docker image, you need to update add the following to the `.env` file:
90+
91+
```
92+
NODE_ENV=development
93+
```
94+
8595
<details>
8696
<summary>Run on a Server (EC2 Instance/Google Compute/VM) </summary>
8797

@@ -134,9 +144,8 @@ We use `docker-compose-infra.yml` to spin up the supporting infra services, a po
134144

135145
1. Clone the Repo
136146
2. Check [Setup Instruction section](#setup-instructions) to update the `.env` file
137-
3. Check [Advance Setup : PostgreSQL DB](#advance-setup--postgresql-db) section to update the `.env` file
138-
4. Run: `yarn install`
139-
5. Run: `yarn dev:server & yarn dev:worker`
147+
3. Run: `yarn install`
148+
4. Run: `yarn dev:server & yarn dev:worker`
140149

141150
The API defaults to `http://localhost:3005`
142151

@@ -161,4 +170,14 @@ We use `docker-compose.yml` to spin up the API Server & Worker along with suppor
161170

162171
The API defaults to `http://localhost:3005`
163172

173+
To access the Swagger UI locally on `http://localhost:3005/` when using the docker image, you need to update add the following to the `.env` file:
174+
175+
### Note:
176+
177+
To access the Swagger UI locally on `http://localhost:3005/` when using the docker image, you need to update add the following to the `.env` file:
178+
179+
```
180+
NODE_ENV=development
181+
```
182+
164183
</details>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@sinclair/typebox": "^0.28",
4343
"@t3-oss/env-core": "^0.6.0",
4444
"@thirdweb-dev/chains": "^0.1.46",
45-
"@thirdweb-dev/sdk": "3.10.59",
45+
"@thirdweb-dev/sdk": "^3.10.60",
4646
"@thirdweb-dev/service-utils": "^0.4.2",
4747
"@thirdweb-dev/wallets": "^1.1.23",
4848
"body-parser": "^1.20.2",

server/api/contract/extensions/erc1155/write/airdrop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export async function erc1155airdrop(fastify: FastifyInstance) {
7070
},
7171
handler: async (request, reply) => {
7272
const { network, contract_address } = request.params;
73-
const { token_id, addresses, tx_overrides } = request.body;
73+
const { token_id, addresses } = request.body;
7474
const walletAddress = request.headers["x-wallet-address"] as string;
7575
const chainId = getChainIdFromChain(network);
7676

server/api/contract/extensions/erc1155/write/burn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function erc1155burn(fastify: FastifyInstance) {
5353
},
5454
handler: async (request, reply) => {
5555
const { network, contract_address } = request.params;
56-
const { token_id, amount, tx_overrides } = request.body;
56+
const { token_id, amount } = request.body;
5757
const walletAddress = request.headers["x-wallet-address"] as string;
5858
const chainId = getChainIdFromChain(network);
5959

server/api/contract/extensions/erc1155/write/burnBatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function erc1155burnBatch(fastify: FastifyInstance) {
5959
},
6060
handler: async (request, reply) => {
6161
const { network, contract_address } = request.params;
62-
const { token_ids, amounts, tx_overrides } = request.body;
62+
const { token_ids, amounts } = request.body;
6363
const walletAddress = request.headers["x-wallet-address"] as string;
6464
const chainId = getChainIdFromChain(network);
6565

server/api/contract/extensions/erc1155/write/claimTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export async function erc1155claimTo(fastify: FastifyInstance) {
5757
},
5858
handler: async (request, reply) => {
5959
const { network, contract_address } = request.params;
60-
const { receiver, token_id, quantity, tx_overrides } = request.body;
60+
const { receiver, token_id, quantity } = request.body;
6161
const walletAddress = request.headers["x-wallet-address"] as string;
6262
const chainId = getChainIdFromChain(network);
6363

server/api/contract/extensions/erc1155/write/lazyMint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function erc1155lazyMint(fastify: FastifyInstance) {
6060
},
6161
handler: async (request, reply) => {
6262
const { network, contract_address } = request.params;
63-
const { metadatas, tx_overrides } = request.body;
63+
const { metadatas } = request.body;
6464
const walletAddress = request.headers["x-wallet-address"] as string;
6565
const chainId = getChainIdFromChain(network);
6666

server/api/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ export async function erc1155mintAdditionalSupplyTo(fastify: FastifyInstance) {
5757
},
5858
handler: async (request, reply) => {
5959
const { network, contract_address } = request.params;
60-
const { receiver, additional_supply, token_id, tx_overrides } =
61-
request.body;
60+
const { receiver, additional_supply, token_id } = request.body;
6261
const walletAddress = request.headers["x-wallet-address"] as string;
6362
const chainId = getChainIdFromChain(network);
6463

server/api/contract/extensions/erc1155/write/mintBatchTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function erc1155mintBatchTo(fastify: FastifyInstance) {
7373
},
7474
handler: async (request, reply) => {
7575
const { network, contract_address } = request.params;
76-
const { receiver, metadataWithSupply, tx_overrides } = request.body;
76+
const { receiver, metadataWithSupply } = request.body;
7777
const walletAddress = request.headers["x-wallet-address"] as string;
7878
const chainId = getChainIdFromChain(network);
7979

server/api/contract/extensions/erc1155/write/mintTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function erc1155mintTo(fastify: FastifyInstance) {
6161
},
6262
handler: async (request, reply) => {
6363
const { network, contract_address } = request.params;
64-
const { receiver, metadataWithSupply, tx_overrides } = request.body;
64+
const { receiver, metadataWithSupply } = request.body;
6565
const walletAddress = request.headers["x-wallet-address"] as string;
6666
const chainId = getChainIdFromChain(network);
6767

0 commit comments

Comments
 (0)