Skip to content

Commit 4037739

Browse files
authored
Update prebuilt setup script (#521)
1 parent 2337863 commit 4037739

File tree

3 files changed

+42
-275
lines changed

3 files changed

+42
-275
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@openzeppelin/contracts": "4.7.3",
1313
"@openzeppelin/contracts-upgradeable": "4.7.3",
1414
"@thirdweb-dev/dynamic-contracts": "^1.1.2",
15-
"@thirdweb-dev/sdk": "3.10.33",
15+
"@thirdweb-dev/sdk": "^3.10.64",
1616
"@typechain/ethers-v5": "^10.0.0",
1717
"@types/fs-extra": "^9.0.13",
1818
"@types/mocha": "^9.1.0",

scripts/deploy-prebuilt-deterministic/deploy-deterministic-std-chains.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import { apiMap, chainIdApiKey, chainIdToName } from "./constants";
1818
////// To run this script: `npx ts-node scripts/deploy-prebuilt-deterministic/deploy-deterministic-std-chains.ts` //////
1919
///// MAKE SURE TO PUT IN THE RIGHT CONTRACT NAME HERE AFTER PUBLISHING IT /////
2020
//// THE CONTRACT SHOULD BE PUBLISHED WITH THE NEW PUBLISH FLOW ////
21-
const publishedContractName = "TokenERC20";
21+
const publishedContractName = "DropERC1155";
2222
const publisherKey: string = process.env.THIRDWEB_PUBLISHER_PRIVATE_KEY as string;
2323
const deployerKey: string = process.env.PRIVATE_KEY as string;
24+
const secretKey: string = process.env.THIRDWEB_SECRET_KEY as string;
2425

25-
const polygonSDK = ThirdwebSDK.fromPrivateKey(publisherKey, "polygon");
26+
const polygonSDK = ThirdwebSDK.fromPrivateKey(publisherKey, "polygon", { secretKey });
2627

2728
async function main() {
2829
const publisher = await polygonSDK.wallet.getAddress();
@@ -42,7 +43,7 @@ async function main() {
4243
}
4344

4445
console.log(`Deploying ${publishedContractName} on ${networkName}`);
45-
const sdk = ThirdwebSDK.fromPrivateKey(deployerKey, chainId); // can also hardcode the chain here
46+
const sdk = ThirdwebSDK.fromPrivateKey(deployerKey, chainId, { secretKey }); // can also hardcode the chain here
4647
const signer = sdk.getSigner() as Signer;
4748
// const chainId = (await sdk.getProvider().getNetwork()).chainId;
4849

0 commit comments

Comments
 (0)