Skip to content

Commit

Permalink
tests: fix flow.test.ts in hardhat env & recompile to change *.js; ad…
Browse files Browse the repository at this point in the history
…d TestVoter.t.sol
  • Loading branch information
ludete committed Jul 1, 2024
1 parent 3fcd275 commit 4398b62
Show file tree
Hide file tree
Showing 44 changed files with 428 additions and 2,437 deletions.
2 changes: 0 additions & 2 deletions src/types/@openzeppelin/contracts-upgradeable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
/* eslint-disable */
import type * as proxy from "./proxy";
export type { proxy };
import type * as security from "./security";
export type { security };
2 changes: 0 additions & 2 deletions src/types/@openzeppelin/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
/* eslint-disable */
import type * as access from "./access";
export type { access };
import type * as interfaces from "./interfaces";
export type { interfaces };
import type * as metatx from "./metatx";
export type { metatx };
import type * as token from "./token";
Expand Down
4 changes: 0 additions & 4 deletions src/types/@openzeppelin/contracts/token/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as erc1155 from "./ERC1155";
export type { erc1155 };
import type * as erc20 from "./ERC20";
export type { erc20 };
import type * as erc721 from "./ERC721";
export type { erc721 };
5 changes: 0 additions & 5 deletions src/types/@openzeppelin/contracts/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type * as cryptography from "./cryptography";
export type { cryptography };
import type * as introspection from "./introspection";
export type { introspection };
import type * as structs from "./structs";
export type { structs };
export type { ShortStrings } from "./ShortStrings";
215 changes: 38 additions & 177 deletions src/types/contracts/RewardsDistributor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type {
FunctionFragment,
Result,
Interface,
EventFragment,
AddressLike,
ContractRunner,
ContractMethod,
Expand All @@ -18,137 +17,61 @@ import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
TypedContractMethod,
} from "../common";

export interface RewardsDistributorInterface extends Interface {
getFunction(
nameOrSignature:
| "WEEK"
| "checkpointToken"
| "claim"
| "claimMany"
| "claimable"
| "lastTokenTime"
| "distributeRewards()"
| "distributeRewards(address,uint256)"
| "setStrategyManager"
| "setVault"
| "startTime"
| "timeCursorOf"
| "tokenLastBalance"
| "tokensPerWeek"
| "strategyManager"
| "vault"
| "ve"
): FunctionFragment;

getEvent(
nameOrSignatureOrTopic: "CheckpointToken" | "Claimed"
): EventFragment;

encodeFunctionData(functionFragment: "WEEK", values?: undefined): string;
encodeFunctionData(
functionFragment: "checkpointToken",
functionFragment: "distributeRewards()",
values?: undefined
): string;
encodeFunctionData(functionFragment: "claim", values: [BigNumberish]): string;
encodeFunctionData(
functionFragment: "claimMany",
values: [BigNumberish[]]
): string;
encodeFunctionData(
functionFragment: "claimable",
values: [BigNumberish]
functionFragment: "distributeRewards(address,uint256)",
values: [AddressLike, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "lastTokenTime",
values?: undefined
functionFragment: "setStrategyManager",
values: [AddressLike]
): string;
encodeFunctionData(
functionFragment: "setVault",
values: [AddressLike]
): string;
encodeFunctionData(functionFragment: "startTime", values?: undefined): string;
encodeFunctionData(
functionFragment: "timeCursorOf",
values: [BigNumberish]
): string;
encodeFunctionData(
functionFragment: "tokenLastBalance",
functionFragment: "strategyManager",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "tokensPerWeek",
values: [BigNumberish]
): string;
encodeFunctionData(functionFragment: "vault", values?: undefined): string;
encodeFunctionData(functionFragment: "ve", values?: undefined): string;

decodeFunctionResult(functionFragment: "WEEK", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "checkpointToken",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "claimMany", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "claimable", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "lastTokenTime",
functionFragment: "distributeRewards()",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "setVault", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "startTime", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "timeCursorOf",
functionFragment: "distributeRewards(address,uint256)",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "tokenLastBalance",
functionFragment: "setStrategyManager",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "setVault", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "tokensPerWeek",
functionFragment: "strategyManager",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "ve", data: BytesLike): Result;
}

export namespace CheckpointTokenEvent {
export type InputTuple = [time: BigNumberish, tokens: BigNumberish];
export type OutputTuple = [time: bigint, tokens: bigint];
export interface OutputObject {
time: bigint;
tokens: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

export namespace ClaimedEvent {
export type InputTuple = [
tokenId: BigNumberish,
epochStart: BigNumberish,
epochEnd: BigNumberish,
amount: BigNumberish
];
export type OutputTuple = [
tokenId: bigint,
epochStart: bigint,
epochEnd: bigint,
amount: bigint
];
export interface OutputObject {
tokenId: bigint;
epochStart: bigint;
epochEnd: bigint;
amount: bigint;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}

export interface RewardsDistributor extends BaseContract {
Expand Down Expand Up @@ -194,114 +117,52 @@ export interface RewardsDistributor extends BaseContract {
event?: TCEvent
): Promise<this>;

WEEK: TypedContractMethod<[], [bigint], "view">;

checkpointToken: TypedContractMethod<[], [void], "nonpayable">;

claim: TypedContractMethod<[_tokenId: BigNumberish], [bigint], "nonpayable">;
"distributeRewards()": TypedContractMethod<[], [void], "payable">;

claimMany: TypedContractMethod<
[_tokenIds: BigNumberish[]],
[boolean],
"distributeRewards(address,uint256)": TypedContractMethod<
[_token: AddressLike, _amount: BigNumberish],
[void],
"nonpayable"
>;

claimable: TypedContractMethod<[_tokenId: BigNumberish], [bigint], "view">;

lastTokenTime: TypedContractMethod<[], [bigint], "view">;
setStrategyManager: TypedContractMethod<
[_manager: AddressLike],
[void],
"nonpayable"
>;

setVault: TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">;

startTime: TypedContractMethod<[], [bigint], "view">;

timeCursorOf: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;

tokenLastBalance: TypedContractMethod<[], [bigint], "view">;

tokensPerWeek: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
strategyManager: TypedContractMethod<[], [string], "view">;

vault: TypedContractMethod<[], [string], "view">;

ve: TypedContractMethod<[], [string], "view">;

getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;

getFunction(
nameOrSignature: "WEEK"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "checkpointToken"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "claim"
): TypedContractMethod<[_tokenId: BigNumberish], [bigint], "nonpayable">;
getFunction(
nameOrSignature: "claimMany"
): TypedContractMethod<[_tokenIds: BigNumberish[]], [boolean], "nonpayable">;
nameOrSignature: "distributeRewards()"
): TypedContractMethod<[], [void], "payable">;
getFunction(
nameOrSignature: "claimable"
): TypedContractMethod<[_tokenId: BigNumberish], [bigint], "view">;
nameOrSignature: "distributeRewards(address,uint256)"
): TypedContractMethod<
[_token: AddressLike, _amount: BigNumberish],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "lastTokenTime"
): TypedContractMethod<[], [bigint], "view">;
nameOrSignature: "setStrategyManager"
): TypedContractMethod<[_manager: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "setVault"
): TypedContractMethod<[_vault: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "startTime"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "timeCursorOf"
): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
getFunction(
nameOrSignature: "tokenLastBalance"
): TypedContractMethod<[], [bigint], "view">;
getFunction(
nameOrSignature: "tokensPerWeek"
): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
nameOrSignature: "strategyManager"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "vault"
): TypedContractMethod<[], [string], "view">;
getFunction(nameOrSignature: "ve"): TypedContractMethod<[], [string], "view">;

getEvent(
key: "CheckpointToken"
): TypedContractEvent<
CheckpointTokenEvent.InputTuple,
CheckpointTokenEvent.OutputTuple,
CheckpointTokenEvent.OutputObject
>;
getEvent(
key: "Claimed"
): TypedContractEvent<
ClaimedEvent.InputTuple,
ClaimedEvent.OutputTuple,
ClaimedEvent.OutputObject
>;

filters: {
"CheckpointToken(uint256,uint256)": TypedContractEvent<
CheckpointTokenEvent.InputTuple,
CheckpointTokenEvent.OutputTuple,
CheckpointTokenEvent.OutputObject
>;
CheckpointToken: TypedContractEvent<
CheckpointTokenEvent.InputTuple,
CheckpointTokenEvent.OutputTuple,
CheckpointTokenEvent.OutputObject
>;

"Claimed(uint256,uint256,uint256,uint256)": TypedContractEvent<
ClaimedEvent.InputTuple,
ClaimedEvent.OutputTuple,
ClaimedEvent.OutputObject
>;
Claimed: TypedContractEvent<
ClaimedEvent.InputTuple,
ClaimedEvent.OutputTuple,
ClaimedEvent.OutputObject
>;
};
filters: {};
}
Loading

0 comments on commit 4398b62

Please sign in to comment.