From b72f6a870c4ce1f740e70208a2591f299ff4bdf3 Mon Sep 17 00:00:00 2001 From: Taki Date: Tue, 21 May 2024 15:04:14 +0900 Subject: [PATCH] feat: joc deploy config --- config/.env.joc | 10 ++++++++++ config/.env.joc_testnet | 10 ++++++++++ hardhat.config.ts | 8 ++++++++ package.json | 2 ++ scripts/deploy.ts | 9 ++++----- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 config/.env.joc create mode 100644 config/.env.joc_testnet diff --git a/config/.env.joc b/config/.env.joc new file mode 100644 index 00000000..e563bbdb --- /dev/null +++ b/config/.env.joc @@ -0,0 +1,10 @@ +GATEWAY_PROXY_ADDRESS="0xB6320E41B0A2ab217Fb74459ac7fd8781f68CC09" +ACCESS_CONTROL_CHECKER_BY_NFT_ADDRESS="0x9b0C09A6DF27f972E8051E54FbB5DeF560bea0E5" +#Set your NFT's metadata url +METADATA_URL=https://xxx.yyy.zzz +#Set your NFT's sign message +MESSAGE_TO_BE_SIGNED=Hello VWBL +#Set your Japapan Open Chain Mainnet's API URL +JOC_MAINNET_URL= +#Set your private key +PRIVATE_KEY= \ No newline at end of file diff --git a/config/.env.joc_testnet b/config/.env.joc_testnet new file mode 100644 index 00000000..f6e77f29 --- /dev/null +++ b/config/.env.joc_testnet @@ -0,0 +1,10 @@ +GATEWAY_PROXY_ADDRESS="0xB6320E41B0A2ab217Fb74459ac7fd8781f68CC09" +ACCESS_CONTROL_CHECKER_BY_NFT_ADDRESS="0x9b0C09A6DF27f972E8051E54FbB5DeF560bea0E5" +#Set your NFT's metadata url +METADATA_URL=https://xxx.yyy.zzz +#Set your NFT's sign message +MESSAGE_TO_BE_SIGNED=Hello VWBL +#Set your Japapan Open Chain Testnet's API URL +JOC_TESTNET_URL= +#Set your private key +PRIVATE_KEY= \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 2c69343b..584348e2 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -49,6 +49,14 @@ const config: HardhatUserConfig = { aurora_testnet: { url: process.env.AURORA_TESTNET_URL || "", accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [] + }, + joc: { + url: process.env.JOC_MAINNET_URL || "", + accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [] + }, + joc_testnet: { + url: process.env.JOC_TESTNET_URL || "", + accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [] } }, } diff --git a/package.json b/package.json index 01649735..4b22187e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,8 @@ "deploy:sepolia": "env-cmd -f ./config/.env.sepolia hardhat run --network sepolia scripts/deploy.ts", "deploy:aurora": "env-cmd -f ./config/.env.aurora hardhat run --network aurora scripts/deploy.ts", "deploy:aurora_testnet": "env-cmd -f ./config/.env.aurora_testnet hardhat run --network aurora_testnet scripts/deploy.ts", + "deploy:joc": "env-cmd -f ./config/.env.joc hardhat run --network joc scripts/deploy.ts", + "deploy:joc_testnet": "env-cmd -f ./config/.env.joc_testnet hardhat run --network joc_testnet scripts/deploy.ts", "verify": "hardhat verify" }, "devDependencies": { diff --git a/scripts/deploy.ts b/scripts/deploy.ts index c0dcb674..4ef3da7a 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -18,13 +18,12 @@ async function main() { const baseURI = process.env.METADATA_URL! console.log("VWBL Metadata URL: ", baseURI) - const gatewayProxyContractAddress = process.env.GATEWAY_PROXY_ADDRESS!; - const accessControlCheckerByNFTContractAddress = process.env.ACCESS_CONTROL_CHECKER_BY_NFT_ADDRESS!; - const messageToBeSigned = process.env.MESSAGE_TO_BE_SIGNED!; - console.log("Message to be signed: ", messageToBeSigned); + const gatewayProxyContractAddress = process.env.GATEWAY_PROXY_ADDRESS! + const accessControlCheckerByNFTContractAddress = process.env.ACCESS_CONTROL_CHECKER_BY_NFT_ADDRESS! + const messageToBeSigned = process.env.MESSAGE_TO_BE_SIGNED! + console.log("Message to be signed: ", messageToBeSigned) let VWBLERC721Contract: Contract; - const vwblERC721 = await ethers.getContractFactory("VWBLERC721ERC2981") VWBLERC721Contract = await vwblERC721.deploy( baseURI,