diff --git a/src/actions/getGasAccountingParams.ts b/src/actions/getGasAccountingParams.ts new file mode 100644 index 00000000..fd8dfbff --- /dev/null +++ b/src/actions/getGasAccountingParams.ts @@ -0,0 +1,20 @@ +import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; +import { arbGasInfo } from '../contracts'; + +type ArbGasInfoABI = typeof arbGasInfo.abi; +export type GetGasAccountingParamsParameters = void; + +export type GetGasAccountingParamsReturnType = ReadContractReturnType< + ArbGasInfoABI, + 'getGasAccountingParams' +>; + +export async function getGasAccountingParams( + client: PublicClient, +): Promise { + return client.readContract({ + abi: arbGasInfo.abi, + functionName: 'getGasAccountingParams', + address: arbGasInfo.address, + }); +} diff --git a/src/actions/getMinimumGasPrice.ts b/src/actions/getMinimumGasPrice.ts new file mode 100644 index 00000000..5d285b72 --- /dev/null +++ b/src/actions/getMinimumGasPrice.ts @@ -0,0 +1,20 @@ +import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; +import { arbGasInfo } from '../contracts'; + +type ArbGasInfoABI = typeof arbGasInfo.abi; +export type GetMinimumGasPriceParameters = void; + +export type GetMinimumGasPriceReturnType = ReadContractReturnType< + ArbGasInfoABI, + 'getMinimumGasPrice' +>; + +export async function getMinimumGasPrice( + client: PublicClient, +): Promise { + return client.readContract({ + abi: arbGasInfo.abi, + functionName: 'getMinimumGasPrice', + address: arbGasInfo.address, + }); +} diff --git a/src/actions/getParentBaseFeeEstimate.ts b/src/actions/getParentBaseFeeEstimate.ts new file mode 100644 index 00000000..a83b8e50 --- /dev/null +++ b/src/actions/getParentBaseFeeEstimate.ts @@ -0,0 +1,20 @@ +import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; +import { arbGasInfo } from '../contracts'; + +type ArbGasInfoABI = typeof arbGasInfo.abi; +export type GetParentbaseFeeEstimateParameters = void; + +export type GetParentbaseFeeEstimateReturnType = ReadContractReturnType< + ArbGasInfoABI, + 'getL1BaseFeeEstimate' +>; + +export async function getParentbaseFeeEstimate( + client: PublicClient, +): Promise { + return client.readContract({ + abi: arbGasInfo.abi, + functionName: 'getL1BaseFeeEstimate', + address: arbGasInfo.address, + }); +} diff --git a/src/actions/getParentRewardRate.ts b/src/actions/getParentRewardRate.ts new file mode 100644 index 00000000..7be94c03 --- /dev/null +++ b/src/actions/getParentRewardRate.ts @@ -0,0 +1,20 @@ +import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; +import { arbGasInfo } from '../contracts'; + +type ArbGasInfoABI = typeof arbGasInfo.abi; +export type GetParentRewardRateParameters = void; + +export type GetParentRewardRateReturnType = ReadContractReturnType< + ArbGasInfoABI, + 'getL1RewardRate' +>; + +export async function getParentRewardRate( + client: PublicClient, +): Promise { + return client.readContract({ + abi: arbGasInfo.abi, + functionName: 'getL1RewardRate', + address: arbGasInfo.address, + }); +} diff --git a/src/actions/getParentRewardRecipient.ts b/src/actions/getParentRewardRecipient.ts new file mode 100644 index 00000000..433d0ebd --- /dev/null +++ b/src/actions/getParentRewardRecipient.ts @@ -0,0 +1,20 @@ +import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; +import { arbGasInfo } from '../contracts'; + +type ArbGasInfoABI = typeof arbGasInfo.abi; +export type GetParentRewardRecipientParameters = void; + +export type GetParentRewardRecipientReturnType = ReadContractReturnType< + ArbGasInfoABI, + 'getL1RewardRecipient' +>; + +export async function getParentRewardRecipient( + client: PublicClient, +): Promise { + return client.readContract({ + abi: arbGasInfo.abi, + functionName: 'getL1RewardRecipient', + address: arbGasInfo.address, + }); +}