Skip to content

Commit

Permalink
feat: update contract deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Dec 5, 2024
1 parent 22dc98a commit 192b128
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
1. Rename `contracts/.env.example` to `.env`, and set all parameters with the appropriate data for the environment these Sample game contracts will be deployed.
2. Run `yarn install`
3. Replace `YOUR_IMMUTABLE_RUNNER_SKIN_CONTRACT_ADDRESS` in `scripts/deploy.ts` with your Immutable Runner Skin contract address
3. Run `yarn compile`
4. Run `yarn deploy`
4. Run `yarn compile`
5. Run `yarn deploy`
15 changes: 8 additions & 7 deletions contracts/scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@ import { ethers } from 'hardhat'; // eslint-disable-line import/no-extraneous-de

async function main() {
// Load the Immutable Runner Token contract and get the contract factory
// const tokenContractFactory = await ethers.getContractFactory('RunnerToken');
const tokenContractFactory = await ethers.getContractFactory('RunnerToken');

// Deploy the contract to the zkEVM network
// const tokenContract = await tokenContractFactory.deploy(
// '0x3318a6a5135b8daa9997b34ab140d34e9443f48d', // Immutable Runner Skin contract address
// );
const tokenContract = await tokenContractFactory.deploy(
'YOUR_IMMUTABLE_RUNNER_SKIN_CONTRACT_ADDRESS', // Immutable Runner Skin contract address
);

// console.log('Contract deployed to:', await tokenContract.getAddress());
const tokenContractAddress = await tokenContract.getAddress();
console.log('Token contract deployed to:', tokenContractAddress);

// Load the Immutable Runner Pack contract and get the contract factory
const packContractFactory = await ethers.getContractFactory('RunnerPack');

// Deploy the contract to the zkEVM network
const packContract = await packContractFactory.deploy(
'0x5838241BCABB660f999264bCda571Fc59931d17e', // Immutable Runner Token contract address
tokenContractAddress, // Immutable Runner Token contract address
'0x5F5EBa8133f68ea22D712b0926e2803E78D89221', // Immutable Operator Allowlist
);

console.log('Contract deployed to:', await packContract.getAddress());
console.log('Pack contract deployed to:', await packContract.getAddress());
}

main()
Expand Down

0 comments on commit 192b128

Please sign in to comment.