Skip to content

Commit

Permalink
chore: update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean McCaffery committed Sep 9, 2024
1 parent 83c5b7a commit 4ad3863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import SetSplitDestinationContract from "@contracts/bytecodeAndAbi/Contest.4.29.
import MakeJkLabsSplitConfigurableContract from "@contracts/bytecodeAndAbi/Contest.4.30.makeJkLabsSplitConfigurable.sol/Contest.json";
import AddMetadataFieldsContract from "@contracts/bytecodeAndAbi/Contest.4.31.addMetadataFields.sol/Contest.json";
import CheckCanceledContract from "@contracts/bytecodeAndAbi/Contest.4.32.checkCanceled.sol/Contest.json";
import MustCancelToWithdrawContract from "@contracts/bytecodeAndAbi/Contest.4.33.mustCancelToWithdraw.sol/Contest.json";
import NewValueAlreadyInArrayContract from "@contracts/bytecodeAndAbi/Contest.4.3.newValueAlreadyInArray.sol/Contest.json";
import UseCustomErrorsContract from "@contracts/bytecodeAndAbi/Contest.4.4.useCustomErrors.sol/Contest.json";
import CleanUpSortingContract from "@contracts/bytecodeAndAbi/Contest.4.5.cleanUpSorting.sol/Contest.json";
Expand All @@ -72,7 +73,9 @@ export async function getContestContractVersion(address: string, chainId: number
const version: string = await executeWithTimeout(MAX_TIME_TO_WAIT_FOR_RPC, contract.version());

const defaultReturn = { abi: null, version: "unknown" };
if (version === "4.32") {
if (version === "4.33") {
return { abi: MustCancelToWithdrawContract.abi, version };
} else if (version === "4.32") {
return { abi: CheckCanceledContract.abi, version };
} else if (version === "4.31") {
return { abi: AddMetadataFieldsContract.abi, version };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import SetSplitDestinationRewards from "@contracts/bytecodeAndAbi/modules/Reward
import MakeJkLabsSplitConfigurableRewards from "@contracts/bytecodeAndAbi/modules/RewardsModule.4.30.makeJkLabsSplitConfigurable.sol/RewardsModule.json";
import AddMetadataFieldsRewards from "@contracts/bytecodeAndAbi/modules/RewardsModule.4.31.addMetadataFields.sol/RewardsModule.json";
import CheckCanceledRewards from "@contracts/bytecodeAndAbi/modules/RewardsModule.4.32.checkCanceled.sol/RewardsModule.json";
import MustCancelToWithdrawRewards from "@contracts/bytecodeAndAbi/modules/RewardsModule.4.33.mustCancelToWithdraw.sol/RewardsModule.json";
import DeployedRewardsContract from "@contracts/bytecodeAndAbi/modules/RewardsModule.sol/RewardsModule.json";
import { ethers } from "ethers";
import { getEthersProvider } from "./ethers";
Expand All @@ -64,7 +65,9 @@ export async function getRewardsModuleContractVersion(address: string, chainId:

try {
const version: string = await executeWithTimeout(MAX_TIME_TO_WAIT_FOR_RPC, contract.version());
if (version === "4.32") {
if (version === "4.33") {
return MustCancelToWithdrawRewards.abi;
} else if (version === "4.32") {
return CheckCanceledRewards.abi;
} else if (version === "4.31") {
return AddMetadataFieldsRewards.abi;
Expand Down

0 comments on commit 4ad3863

Please sign in to comment.