-
Notifications
You must be signed in to change notification settings - Fork 49
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
6b92e77
commit 5eadd44
Showing
5 changed files
with
23 additions
and
25 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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; | ||
import { arbOwnerPublic } from '../contracts'; | ||
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic'; | ||
|
||
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi; | ||
export type GetAllChainOwnersParameters = void; | ||
|
||
export type GetAllChainOwnersReturnType = ReadContractReturnType< | ||
ArbOwnerPublicABI, | ||
typeof arbOwnerPublicABI, | ||
'getAllChainOwners' | ||
>; | ||
|
||
export async function getAllChainOwners<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetAllChainOwnersReturnType> { | ||
return client.readContract({ | ||
abi: arbOwnerPublic.abi, | ||
abi: arbOwnerPublicABI, | ||
functionName: 'getAllChainOwners', | ||
address: arbOwnerPublic.address, | ||
address: arbOwnerPublicAddress, | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; | ||
import { arbOwnerPublic } from '../contracts'; | ||
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic'; | ||
|
||
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi; | ||
export type GetInfraFeeAccountParameters = void; | ||
|
||
export type GetInfraFeeAccountReturnType = ReadContractReturnType< | ||
ArbOwnerPublicABI, | ||
typeof arbOwnerPublicABI, | ||
'getInfraFeeAccount' | ||
>; | ||
|
||
export async function getInfraFeeAccount<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetInfraFeeAccountReturnType> { | ||
return client.readContract({ | ||
abi: arbOwnerPublic.abi, | ||
abi: arbOwnerPublicABI, | ||
functionName: 'getInfraFeeAccount', | ||
address: arbOwnerPublic.address, | ||
address: arbOwnerPublicAddress, | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; | ||
import { arbOwnerPublic } from '../contracts'; | ||
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic'; | ||
|
||
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi; | ||
export type GetNetworkFeeAccountParameters = void; | ||
|
||
export type GetNetworkFeeAccountReturnType = ReadContractReturnType< | ||
ArbOwnerPublicABI, | ||
typeof arbOwnerPublicABI, | ||
'getNetworkFeeAccount' | ||
>; | ||
|
||
export async function getNetworkFeeAccount<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
): Promise<GetNetworkFeeAccountReturnType> { | ||
return client.readContract({ | ||
abi: arbOwnerPublic.abi, | ||
abi: arbOwnerPublicABI, | ||
functionName: 'getNetworkFeeAccount', | ||
address: arbOwnerPublic.address, | ||
address: arbOwnerPublicAddress, | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
import { Address, Chain, PublicClient, ReadContractReturnType, Transport } from 'viem'; | ||
import { arbOwnerPublic } from '../contracts'; | ||
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic'; | ||
|
||
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi; | ||
export type IsChainOwnerParameters = { | ||
address: Address; | ||
}; | ||
|
||
export type IsChainOwnerReturnType = ReadContractReturnType<ArbOwnerPublicABI, 'isChainOwner'>; | ||
export type IsChainOwnerReturnType = ReadContractReturnType< | ||
typeof arbOwnerPublicABI, | ||
'isChainOwner' | ||
>; | ||
|
||
export async function isChainOwner<TChain extends Chain | undefined>( | ||
client: PublicClient<Transport, TChain>, | ||
args: IsChainOwnerParameters, | ||
): Promise<IsChainOwnerReturnType> { | ||
return client.readContract({ | ||
abi: arbOwnerPublic.abi, | ||
abi: arbOwnerPublicABI, | ||
functionName: 'isChainOwner', | ||
address: arbOwnerPublic.address, | ||
address: arbOwnerPublicAddress, | ||
args: [args.address], | ||
}); | ||
} |