diff --git a/packages/zevm-app-contracts/data/addresses.json b/packages/zevm-app-contracts/data/addresses.json index 2e3e46a..acfec2f 100644 --- a/packages/zevm-app-contracts/data/addresses.json +++ b/packages/zevm-app-contracts/data/addresses.json @@ -8,7 +8,7 @@ "invitationManager": "0x3649C03C472B698213926543456E9c21081e529d", "withdrawERC20": "0xa349B9367cc54b47CAb8D09A95836AE8b4D1d84E", "ZetaXP": "0x5c25b6f4D2b7a550a80561d3Bf274C953aC8be7d", - "InstantRewards": "0x10DfEd4ba9b8F6a1c998E829FfC0325D533c80E3", + "InstantRewards": "0xd91164c9671C5A2ee1C95fa34A95C9141dA691D4", "ProofOfLiveness": "0x981EB6fD19717Faf293Fba0cBD05C6Ac97b8C808", "TimelockController": "0x44139C2150c11c25f517B8a8F974b59C82aEe709", "ZetaXPGov": "0x854032d484aE21acC34F36324E55A8080F21Af12", diff --git a/packages/zevm-app-contracts/scripts/instant-rewards/deploy-v2.ts b/packages/zevm-app-contracts/scripts/instant-rewards/deploy-v2.ts new file mode 100644 index 0000000..67319f3 --- /dev/null +++ b/packages/zevm-app-contracts/scripts/instant-rewards/deploy-v2.ts @@ -0,0 +1,37 @@ +import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { ethers, network } from "hardhat"; + +import { InstantRewardsFactory__factory } from "../../typechain-types"; +import { saveAddress } from "../address.helpers"; +import { verifyContract } from "../explorer.helpers"; + +const networkName = network.name; + +const owner = "0x1d24d94520B94B26351f6573de5ef9731c48531A"; + +const deployInstantRewards = async () => { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + const InstantRewardsFactory = (await ethers.getContractFactory( + "InstantRewardsFactory" + )) as InstantRewardsFactory__factory; + const InstantRewards = await InstantRewardsFactory.deploy(owner); + + await InstantRewards.deployed(); + + console.log("InstantRewards deployed to:", InstantRewards.address); + + saveAddress("InstantRewards", InstantRewards.address, networkName); + + await verifyContract(InstantRewards.address, [owner]); +}; + +const main = async () => { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + await deployInstantRewards(); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +});