Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Ethers v6 #104

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion packages/amm/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ const config: HardhatUserConfig = {
},
typechain: {
outDir: "src/types",
target: "ethers-v5",
},
};

Expand Down
4 changes: 2 additions & 2 deletions packages/amm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@openzeppelin/contracts-upgradeable": "4.5.2",
"@prb/contracts": "3.8.1",
"@prb/math": "2.5.0",
"ethers": "^5.7.2"
"ethers": "^6.8.1"
},
"devDependencies": {
"@ethersproject/abstract-provider": "^5.7.0",
Expand All @@ -32,7 +32,7 @@
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@nomiclabs/hardhat-waffle": "^2.0.6",
"@typechain/ethers-v5": "^10.2.1",
"@typechain/ethers-v6": "^0.5.1",
"@typechain/hardhat": "^9.1.0",
"@types/chai": "^4.3.10",
"@types/mocha": "^10.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,39 @@
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type {
FunctionFragment,
Result,
Interface,
EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
AddressLike,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedEventFilter,
TypedEvent,
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedLogDescription,
TypedListener,
OnEvent,
PromiseOrValue,
TypedContractMethod,
} from "../../../../common";

export interface IOwnableUpgradeableInterface extends utils.Interface {
functions: {
"_renounceOwnership()": FunctionFragment;
"_transferOwnership(address)": FunctionFragment;
"owner()": FunctionFragment;
};

export interface IOwnableUpgradeableInterface extends Interface {
getFunction(
nameOrSignatureOrTopic:
| "_renounceOwnership"
| "_transferOwnership"
| "owner"
nameOrSignature: "_renounceOwnership" | "_transferOwnership" | "owner"
): FunctionFragment;

getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment;

encodeFunctionData(
functionFragment: "_renounceOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "_transferOwnership",
values: [PromiseOrValue<string>]
values: [AddressLike]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;

Expand All @@ -59,121 +48,106 @@ export interface IOwnableUpgradeableInterface extends utils.Interface {
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;

events: {
"TransferOwnership(address,address)": EventFragment;
};

getEvent(nameOrSignatureOrTopic: "TransferOwnership"): EventFragment;
}

export interface TransferOwnershipEventObject {
oldOwner: string;
newOwner: string;
export namespace TransferOwnershipEvent {
export type InputTuple = [oldOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [oldOwner: string, newOwner: string];
export interface OutputObject {
oldOwner: string;
newOwner: string;
}
export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
export type Filter = TypedDeferredTopicFilter<Event>;
export type Log = TypedEventLog<Event>;
export type LogDescription = TypedLogDescription<Event>;
}
export type TransferOwnershipEvent = TypedEvent<
[string, string],
TransferOwnershipEventObject
>;

export type TransferOwnershipEventFilter =
TypedEventFilter<TransferOwnershipEvent>;

export interface IOwnableUpgradeable extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
connect(runner?: ContractRunner | null): IOwnableUpgradeable;
waitForDeployment(): Promise<this>;

interface: IOwnableUpgradeableInterface;

queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;

listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;

functions: {
_renounceOwnership(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

_transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

owner(overrides?: CallOverrides): Promise<[string]>;
};

_renounceOwnership(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

_transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<ContractTransaction>;

owner(overrides?: CallOverrides): Promise<string>;

callStatic: {
_renounceOwnership(overrides?: CallOverrides): Promise<void>;
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;

on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;

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

_transferOwnership: TypedContractMethod<
[newOwner: AddressLike],
[void],
"nonpayable"
>;

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

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

_transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: CallOverrides
): Promise<void>;
getFunction(
nameOrSignature: "_renounceOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "_transferOwnership"
): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
getFunction(
nameOrSignature: "owner"
): TypedContractMethod<[], [string], "view">;

owner(overrides?: CallOverrides): Promise<string>;
};
getEvent(
key: "TransferOwnership"
): TypedContractEvent<
TransferOwnershipEvent.InputTuple,
TransferOwnershipEvent.OutputTuple,
TransferOwnershipEvent.OutputObject
>;

filters: {
"TransferOwnership(address,address)"(
oldOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null
): TransferOwnershipEventFilter;
TransferOwnership(
oldOwner?: PromiseOrValue<string> | null,
newOwner?: PromiseOrValue<string> | null
): TransferOwnershipEventFilter;
};

estimateGas: {
_renounceOwnership(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;

_transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<BigNumber>;

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

populateTransaction: {
_renounceOwnership(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;

_transferOwnership(
newOwner: PromiseOrValue<string>,
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<PopulatedTransaction>;

owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
"TransferOwnership(address,address)": TypedContractEvent<
TransferOwnershipEvent.InputTuple,
TransferOwnershipEvent.OutputTuple,
TransferOwnershipEvent.OutputObject
>;
TransferOwnership: TypedContractEvent<
TransferOwnershipEvent.InputTuple,
TransferOwnershipEvent.OutputTuple,
TransferOwnershipEvent.OutputObject
>;
};
}
Loading
Loading