-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01df689
commit fa91c26
Showing
5 changed files
with
100 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetGasAccountingParamsReturnType> { | ||
return client.readContract({ | ||
abi: arbGasInfo.abi, | ||
functionName: 'getGasAccountingParams', | ||
address: arbGasInfo.address, | ||
}); | ||
} |
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,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<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetMinimumGasPriceReturnType> { | ||
return client.readContract({ | ||
abi: arbGasInfo.abi, | ||
functionName: 'getMinimumGasPrice', | ||
address: arbGasInfo.address, | ||
}); | ||
} |
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,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<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetParentbaseFeeEstimateReturnType> { | ||
return client.readContract({ | ||
abi: arbGasInfo.abi, | ||
functionName: 'getL1BaseFeeEstimate', | ||
address: arbGasInfo.address, | ||
}); | ||
} |
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,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<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetParentRewardRateReturnType> { | ||
return client.readContract({ | ||
abi: arbGasInfo.abi, | ||
functionName: 'getL1RewardRate', | ||
address: arbGasInfo.address, | ||
}); | ||
} |
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,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<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetParentRewardRecipientReturnType> { | ||
return client.readContract({ | ||
abi: arbGasInfo.abi, | ||
functionName: 'getL1RewardRecipient', | ||
address: arbGasInfo.address, | ||
}); | ||
} |