Skip to content

Commit

Permalink
remove proxy storage placeholder for upgrade compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
RnkSngh committed Jul 30, 2024
1 parent 5bda2d0 commit bc65d14
Show file tree
Hide file tree
Showing 10 changed files with 918 additions and 8 deletions.
207 changes: 206 additions & 1 deletion bindings/go/dispatcher/Dispatcher.go

Large diffs are not rendered by default.

207 changes: 206 additions & 1 deletion bindings/go/feevault/FeeVault.go

Large diffs are not rendered by default.

207 changes: 206 additions & 1 deletion bindings/go/universalchannelhandler/UniversalChannelHandler.go

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions contracts/core/UniversalChannelHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import {FeeSender} from "../implementation_templates/FeeSender.sol";
* @dev This contract can integrate directly with dapps, or a middleware stack for packet routing.
*/
contract UniversalChannelHandler is IbcReceiverBaseUpgradeable, FeeSender, UUPSUpgradeable, IbcUniversalChannelMW {
bytes32 private _UNUSED; // Storage placeholder to ensure upgrade from this version is backwards compatible

string public constant VERSION = "1.0";
uint256 public constant MW_ID = 1;

Expand Down
60 changes: 60 additions & 0 deletions src/evm/contracts/Dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export type AckPacketStructOutput = [success: boolean, data: string] & {
export interface DispatcherInterface extends Interface {
getFunction(
nameOrSignature:
| "acceptOwnership"
| "acknowledgement"
| "channelCloseConfirm"
| "channelCloseInit"
Expand All @@ -194,6 +195,7 @@ export interface DispatcherInterface extends Interface {
| "getOptimisticConsensusState"
| "initialize"
| "owner"
| "pendingOwner"
| "portPrefix"
| "portPrefixLen"
| "proxiableUUID"
Expand Down Expand Up @@ -230,6 +232,7 @@ export interface DispatcherInterface extends Interface {
| "ChannelOpenTry"
| "ChannelOpenTryError"
| "Initialized"
| "OwnershipTransferStarted"
| "OwnershipTransferred"
| "RecvPacket"
| "SendPacket"
Expand All @@ -240,6 +243,10 @@ export interface DispatcherInterface extends Interface {
| "WriteTimeoutPacket"
): EventFragment;

encodeFunctionData(
functionFragment: "acceptOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "acknowledgement",
values: [IbcPacketStruct, BytesLike, Ics23ProofStruct]
Expand Down Expand Up @@ -303,6 +310,10 @@ export interface DispatcherInterface extends Interface {
values: [string, AddressLike]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "pendingOwner",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "portPrefix",
values?: undefined
Expand Down Expand Up @@ -370,6 +381,10 @@ export interface DispatcherInterface extends Interface {
values: [IbcPacketStruct, Ics23ProofStruct]
): string;

decodeFunctionResult(
functionFragment: "acceptOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "acknowledgement",
data: BytesLike
Expand Down Expand Up @@ -406,6 +421,10 @@ export interface DispatcherInterface extends Interface {
): Result;
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "pendingOwner",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "portPrefix", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "portPrefixLen",
Expand Down Expand Up @@ -720,6 +739,19 @@ export namespace InitializedEvent {
export type LogDescription = TypedLogDescription<Event>;
}

export namespace OwnershipTransferStartedEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
export interface OutputObject {
previousOwner: 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 namespace OwnershipTransferredEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
Expand Down Expand Up @@ -926,6 +958,8 @@ export interface Dispatcher extends BaseContract {
event?: TCEvent
): Promise<this>;

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

acknowledgement: TypedContractMethod<
[packet: IbcPacketStruct, ack: BytesLike, proof: Ics23ProofStruct],
[void],
Expand Down Expand Up @@ -1023,6 +1057,8 @@ export interface Dispatcher extends BaseContract {

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

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

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

portPrefixLen: TypedContractMethod<[], [bigint], "view">;
Expand Down Expand Up @@ -1107,6 +1143,9 @@ export interface Dispatcher extends BaseContract {
key: string | FunctionFragment
): T;

getFunction(
nameOrSignature: "acceptOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "acknowledgement"
): TypedContractMethod<
Expand Down Expand Up @@ -1212,6 +1251,9 @@ export interface Dispatcher extends BaseContract {
getFunction(
nameOrSignature: "owner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "pendingOwner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "portPrefix"
): TypedContractMethod<[], [string], "view">;
Expand Down Expand Up @@ -1415,6 +1457,13 @@ export interface Dispatcher extends BaseContract {
InitializedEvent.OutputTuple,
InitializedEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferStarted"
): TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferred"
): TypedContractEvent<
Expand Down Expand Up @@ -1660,6 +1709,17 @@ export interface Dispatcher extends BaseContract {
InitializedEvent.OutputObject
>;

"OwnershipTransferStarted(address,address)": TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
OwnershipTransferStarted: TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;

"OwnershipTransferred(address,address)": TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
Expand Down
60 changes: 60 additions & 0 deletions src/evm/contracts/FeeVault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ import type {
export interface FeeVaultInterface extends Interface {
getFunction(
nameOrSignature:
| "acceptOwnership"
| "depositOpenChannelFee"
| "depositSendPacketFee"
| "owner"
| "pendingOwner"
| "renounceOwnership"
| "transferOwnership"
| "withdrawFeesToOwner"
Expand All @@ -37,10 +39,15 @@ export interface FeeVaultInterface extends Interface {
getEvent(
nameOrSignatureOrTopic:
| "OpenChannelFeeDeposited"
| "OwnershipTransferStarted"
| "OwnershipTransferred"
| "SendPacketFeeDeposited"
): EventFragment;

encodeFunctionData(
functionFragment: "acceptOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "depositOpenChannelFee",
values: [AddressLike, string, BigNumberish, string[], string]
Expand All @@ -55,6 +62,10 @@ export interface FeeVaultInterface extends Interface {
]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "pendingOwner",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "renounceOwnership",
values?: undefined
Expand All @@ -68,6 +79,10 @@ export interface FeeVaultInterface extends Interface {
values?: undefined
): string;

decodeFunctionResult(
functionFragment: "acceptOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "depositOpenChannelFee",
data: BytesLike
Expand All @@ -77,6 +92,10 @@ export interface FeeVaultInterface extends Interface {
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "pendingOwner",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "renounceOwnership",
data: BytesLike
Expand Down Expand Up @@ -122,6 +141,19 @@ export namespace OpenChannelFeeDepositedEvent {
export type LogDescription = TypedLogDescription<Event>;
}

export namespace OwnershipTransferStartedEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
export interface OutputObject {
previousOwner: 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 namespace OwnershipTransferredEvent {
export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
export type OutputTuple = [previousOwner: string, newOwner: string];
Expand Down Expand Up @@ -203,6 +235,8 @@ export interface FeeVault extends BaseContract {
event?: TCEvent
): Promise<this>;

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

depositOpenChannelFee: TypedContractMethod<
[
src: AddressLike,
Expand All @@ -228,6 +262,8 @@ export interface FeeVault extends BaseContract {

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

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

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

transferOwnership: TypedContractMethod<
Expand All @@ -242,6 +278,9 @@ export interface FeeVault extends BaseContract {
key: string | FunctionFragment
): T;

getFunction(
nameOrSignature: "acceptOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
getFunction(
nameOrSignature: "depositOpenChannelFee"
): TypedContractMethod<
Expand Down Expand Up @@ -270,6 +309,9 @@ export interface FeeVault extends BaseContract {
getFunction(
nameOrSignature: "owner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "pendingOwner"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "renounceOwnership"
): TypedContractMethod<[], [void], "nonpayable">;
Expand All @@ -287,6 +329,13 @@ export interface FeeVault extends BaseContract {
OpenChannelFeeDepositedEvent.OutputTuple,
OpenChannelFeeDepositedEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferStarted"
): TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
getEvent(
key: "OwnershipTransferred"
): TypedContractEvent<
Expand Down Expand Up @@ -314,6 +363,17 @@ export interface FeeVault extends BaseContract {
OpenChannelFeeDepositedEvent.OutputObject
>;

"OwnershipTransferStarted(address,address)": TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;
OwnershipTransferStarted: TypedContractEvent<
OwnershipTransferStartedEvent.InputTuple,
OwnershipTransferStartedEvent.OutputTuple,
OwnershipTransferStartedEvent.OutputObject
>;

"OwnershipTransferred(address,address)": TypedContractEvent<
OwnershipTransferredEvent.InputTuple,
OwnershipTransferredEvent.OutputTuple,
Expand Down
Loading

0 comments on commit bc65d14

Please sign in to comment.