-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: regenerate contracts from evm package
- Loading branch information
Showing
36 changed files
with
20,312 additions
and
16,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
packages/evm/src/contracts/its/IGatewayCaller/IGatewayCaller.abi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* This file was generated by scripts/codegen.ts | ||
* | ||
* Original abi file: | ||
* - node_modules/@axelar-network/interchain-token-service/artifacts/contracts/interfaces/IGatewayCaller.sol/IGatewayCaller.json | ||
* | ||
* DO NOT EDIT MANUALLY | ||
*/ | ||
|
||
export default { | ||
contractName: "IGatewayCaller", | ||
abi: [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint32", | ||
name: "metadataVersion", | ||
type: "uint32", | ||
}, | ||
], | ||
name: "InvalidMetadataVersion", | ||
type: "error", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "string", | ||
name: "destinationChain", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "string", | ||
name: "destinationAddress", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "bytes", | ||
name: "payload", | ||
type: "bytes", | ||
}, | ||
{ | ||
internalType: "enum IGatewayCaller.MetadataVersion", | ||
name: "metadataVersion", | ||
type: "uint8", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "gasValue", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "callContract", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
], | ||
} as const; |
68 changes: 68 additions & 0 deletions
68
packages/evm/src/contracts/its/IGatewayCaller/IGatewayCaller.args.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* This file was generated by scripts/codegen.ts | ||
* | ||
* Original abi file: | ||
* - node_modules/@axelar-network/interchain-token-service/artifacts/contracts/interfaces/IGatewayCaller.sol/IGatewayCaller.json | ||
* | ||
* DO NOT EDIT MANUALLY | ||
*/ | ||
|
||
import { encodeFunctionData } from "viem"; | ||
|
||
import ABI_FILE from "./IGatewayCaller.abi"; | ||
|
||
export type IGatewayCallerCallContractArgs = { | ||
destinationChain: string; | ||
destinationAddress: string; | ||
payload: `0x${string}`; | ||
metadataVersion: number; | ||
gasValue: bigint; | ||
}; | ||
|
||
/** | ||
* Factory function for IGatewayCaller.callContract function args | ||
*/ | ||
export const encodeIGatewayCallerCallContractArgs = ({ | ||
destinationChain, | ||
destinationAddress, | ||
payload, | ||
metadataVersion, | ||
gasValue, | ||
}: IGatewayCallerCallContractArgs) => | ||
[ | ||
destinationChain, | ||
destinationAddress, | ||
payload, | ||
metadataVersion, | ||
gasValue, | ||
] as const; | ||
|
||
/** | ||
* Encoder function for IGatewayCaller.callContract function data | ||
*/ | ||
export const encodeIGatewayCallerCallContractData = ({ | ||
destinationChain, | ||
destinationAddress, | ||
payload, | ||
metadataVersion, | ||
gasValue, | ||
}: IGatewayCallerCallContractArgs): `0x${string}` => | ||
encodeFunctionData({ | ||
functionName: "callContract", | ||
abi: ABI_FILE.abi, | ||
args: [ | ||
destinationChain, | ||
destinationAddress, | ||
payload, | ||
metadataVersion, | ||
gasValue, | ||
], | ||
}); | ||
|
||
export const IGATEWAY_CALLER_ENCODERS = { | ||
callContract: { | ||
args: encodeIGatewayCallerCallContractArgs, | ||
data: encodeIGatewayCallerCallContractData, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* This file was generated by scripts/codegen.ts | ||
* | ||
* Original abi file: | ||
* - node_modules/@axelar-network/interchain-token-service/artifacts/contracts/interfaces/IGatewayCaller.sol/IGatewayCaller.json | ||
* | ||
* DO NOT EDIT MANUALLY | ||
*/ | ||
|
||
import { Chain } from "viem"; | ||
|
||
import { PublicContractClient } from "../../PublicContractClient"; | ||
import ABI_FILE from "./IGatewayCaller.abi"; | ||
|
||
export * from "./IGatewayCaller.args"; | ||
|
||
export const IGATEWAY_CALLER_ABI = ABI_FILE.abi; | ||
|
||
/** | ||
* IGatewayCallerClient | ||
* | ||
* @description Type-safe contract client for IGatewayCaller | ||
* | ||
* @example | ||
* | ||
* import { sepolia } from "viem/chains"; | ||
* | ||
* const client = createIGatewayCallerClient({ | ||
* chain: sepolia, | ||
* address: "0x1234..." | ||
* }); | ||
*/ | ||
export class IGatewayCallerClient extends PublicContractClient { | ||
static ABI = ABI_FILE.abi; | ||
static contractName = ABI_FILE.contractName; | ||
|
||
constructor(options: { chain: Chain; address: `0x${string}` }) { | ||
super({ | ||
abi: IGATEWAY_CALLER_ABI, | ||
address: options.address, | ||
chain: options.chain, | ||
}); | ||
} | ||
} | ||
|
||
export const createIGatewayCallerClient = (options: { | ||
chain: Chain; | ||
address: `0x${string}`; | ||
}) => new IGatewayCallerClient(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.