Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Revert "New claim contract abi (#2194)"
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Jan 19, 2022
1 parent a657285 commit 391f26c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
22 changes: 8 additions & 14 deletions src/custom/abis/types/VCow.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface VCowInterface extends ethers.utils.Interface {
"deploymentTimestamp()": FunctionFragment;
"gnoPrice()": FunctionFragment;
"usdcPrice()": FunctionFragment;
"nativeTokenPrice()": FunctionFragment;
"wethPrice()": FunctionFragment;
};

encodeFunctionData(
Expand Down Expand Up @@ -68,10 +68,7 @@ interface VCowInterface extends ethers.utils.Interface {
): string;
encodeFunctionData(functionFragment: "gnoPrice", values?: undefined): string;
encodeFunctionData(functionFragment: "usdcPrice", values?: undefined): string;
encodeFunctionData(
functionFragment: "nativeTokenPrice",
values?: undefined
): string;
encodeFunctionData(functionFragment: "wethPrice", values?: undefined): string;

decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "claimMany", data: BytesLike): Result;
Expand All @@ -83,10 +80,7 @@ interface VCowInterface extends ethers.utils.Interface {
): Result;
decodeFunctionResult(functionFragment: "gnoPrice", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "usdcPrice", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "nativeTokenPrice",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "wethPrice", data: BytesLike): Result;

events: {
"Claimed(uint256,uint8,address,uint256,uint256)": EventFragment;
Expand Down Expand Up @@ -183,7 +177,7 @@ export class VCow extends BaseContract {

usdcPrice(overrides?: CallOverrides): Promise<[BigNumber]>;

nativeTokenPrice(overrides?: CallOverrides): Promise<[BigNumber]>;
wethPrice(overrides?: CallOverrides): Promise<[BigNumber]>;
};

claim(
Expand Down Expand Up @@ -217,7 +211,7 @@ export class VCow extends BaseContract {

usdcPrice(overrides?: CallOverrides): Promise<BigNumber>;

nativeTokenPrice(overrides?: CallOverrides): Promise<BigNumber>;
wethPrice(overrides?: CallOverrides): Promise<BigNumber>;

callStatic: {
claim(
Expand Down Expand Up @@ -251,7 +245,7 @@ export class VCow extends BaseContract {

usdcPrice(overrides?: CallOverrides): Promise<BigNumber>;

nativeTokenPrice(overrides?: CallOverrides): Promise<BigNumber>;
wethPrice(overrides?: CallOverrides): Promise<BigNumber>;
};

filters: {
Expand Down Expand Up @@ -325,7 +319,7 @@ export class VCow extends BaseContract {

usdcPrice(overrides?: CallOverrides): Promise<BigNumber>;

nativeTokenPrice(overrides?: CallOverrides): Promise<BigNumber>;
wethPrice(overrides?: CallOverrides): Promise<BigNumber>;
};

populateTransaction: {
Expand Down Expand Up @@ -365,6 +359,6 @@ export class VCow extends BaseContract {

usdcPrice(overrides?: CallOverrides): Promise<PopulatedTransaction>;

nativeTokenPrice(overrides?: CallOverrides): Promise<PopulatedTransaction>;
wethPrice(overrides?: CallOverrides): Promise<PopulatedTransaction>;
};
}
2 changes: 1 addition & 1 deletion src/custom/abis/types/factories/VCow__factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const _abi = [
},
{
inputs: [],
name: "nativeTokenPrice",
name: "wethPrice",
outputs: [
{
internalType: "uint256",
Expand Down
2 changes: 1 addition & 1 deletion src/custom/abis/vCow.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
},
{
"inputs": [],
"name": "nativeTokenPrice",
"name": "wethPrice",
"outputs": [
{
"internalType": "uint256",
Expand Down
2 changes: 1 addition & 1 deletion src/custom/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const V_COW_CONTRACT_ADDRESS: Partial<Record<number, string>> = {
// [ChainId.MAINNET]: GPv2Settlement[ChainId.MAINNET].address,
// [ChainId.RINKEBY]: GPv2Settlement[ChainId.RINKEBY].address,
// [ChainId.XDAI]: GPv2Settlement[ChainId.XDAI].address,
[ChainId.RINKEBY]: '0x64F3A9988Af37e8d832194e4A00E4Eb94a91b764',
[ChainId.RINKEBY]: '0x71A377EC0026A8E35AfD082d54E2f62d39AF075c',
}

// See https://github.com/gnosis/gp-v2-contracts/commit/821b5a8da213297b0f7f1d8b17c893c5627020af#diff-12bbbe13cd5cf42d639e34a39d8795021ba40d3ee1e1a8282df652eb161a11d6R13
Expand Down
4 changes: 3 additions & 1 deletion src/custom/state/claim/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ export function useClaimTimeInfo(): ClaimTimeInfo {
}

export function useNativeTokenPrice(): string | null {
return _useVCowPriceForToken('nativeTokenPrice')
// TODO: rename fn to `nativeTokenPrice` and revert e7197dd27287ff1460a7d7af22734cae938b8c83
// when there's a new deployment
return _useVCowPriceForToken('wethPrice')
}

export function useGnoPrice(): string | null {
Expand Down

0 comments on commit 391f26c

Please sign in to comment.