Skip to content

Commit 5eadd44

Browse files
committed
Fix ABI
1 parent 6b92e77 commit 5eadd44

File tree

5 files changed

+23
-25
lines changed

5 files changed

+23
-25
lines changed

src/actions/getAllChainOwners.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem';
2-
import { arbOwnerPublic } from '../contracts';
2+
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic';
33

4-
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi;
54
export type GetAllChainOwnersParameters = void;
65

76
export type GetAllChainOwnersReturnType = ReadContractReturnType<
8-
ArbOwnerPublicABI,
7+
typeof arbOwnerPublicABI,
98
'getAllChainOwners'
109
>;
1110

1211
export async function getAllChainOwners<TChain extends Chain | undefined>(
1312
client: PublicClient<Transport, TChain>,
1413
): Promise<GetAllChainOwnersReturnType> {
1514
return client.readContract({
16-
abi: arbOwnerPublic.abi,
15+
abi: arbOwnerPublicABI,
1716
functionName: 'getAllChainOwners',
18-
address: arbOwnerPublic.address,
17+
address: arbOwnerPublicAddress,
1918
});
2019
}

src/actions/getInfraFeeAccount.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem';
2-
import { arbOwnerPublic } from '../contracts';
2+
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic';
33

4-
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi;
54
export type GetInfraFeeAccountParameters = void;
65

76
export type GetInfraFeeAccountReturnType = ReadContractReturnType<
8-
ArbOwnerPublicABI,
7+
typeof arbOwnerPublicABI,
98
'getInfraFeeAccount'
109
>;
1110

1211
export async function getInfraFeeAccount<TChain extends Chain | undefined>(
1312
client: PublicClient<Transport, TChain>,
1413
): Promise<GetInfraFeeAccountReturnType> {
1514
return client.readContract({
16-
abi: arbOwnerPublic.abi,
15+
abi: arbOwnerPublicABI,
1716
functionName: 'getInfraFeeAccount',
18-
address: arbOwnerPublic.address,
17+
address: arbOwnerPublicAddress,
1918
});
2019
}

src/actions/getNetworkFeeAccount.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem';
2-
import { arbOwnerPublic } from '../contracts';
2+
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic';
33

4-
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi;
54
export type GetNetworkFeeAccountParameters = void;
65

76
export type GetNetworkFeeAccountReturnType = ReadContractReturnType<
8-
ArbOwnerPublicABI,
7+
typeof arbOwnerPublicABI,
98
'getNetworkFeeAccount'
109
>;
1110

1211
export async function getNetworkFeeAccount<TChain extends Chain | undefined>(
1312
client: PublicClient<Transport, TChain>,
1413
): Promise<GetNetworkFeeAccountReturnType> {
1514
return client.readContract({
16-
abi: arbOwnerPublic.abi,
15+
abi: arbOwnerPublicABI,
1716
functionName: 'getNetworkFeeAccount',
18-
address: arbOwnerPublic.address,
17+
address: arbOwnerPublicAddress,
1918
});
2019
}

src/actions/getScheduledUpgrade.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { Chain, PublicClient, ReadContractReturnType, Transport } from 'viem';
2-
import { arbOwnerPublic } from '../contracts';
2+
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic';
33

4-
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi;
54
export type GetScheduledUpgradeParameters = void;
65

76
type GetScheduledUpgradeRawReturnType = ReadContractReturnType<
8-
ArbOwnerPublicABI,
7+
typeof arbOwnerPublicABI,
98
'getScheduledUpgrade'
109
>;
1110
export type GetScheduledUpgradeReturnType = {
@@ -17,9 +16,9 @@ export async function getScheduledUpgrade<TChain extends Chain | undefined>(
1716
client: PublicClient<Transport, TChain>,
1817
): Promise<GetScheduledUpgradeReturnType> {
1918
const [arbosVersion, scheduledForTimestamp] = await client.readContract({
20-
abi: arbOwnerPublic.abi,
19+
abi: arbOwnerPublicABI,
2120
functionName: 'getScheduledUpgrade',
22-
address: arbOwnerPublic.address,
21+
address: arbOwnerPublicAddress,
2322
});
2423
return {
2524
arbosVersion,

src/actions/isChainOwner.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
import { Address, Chain, PublicClient, ReadContractReturnType, Transport } from 'viem';
2-
import { arbOwnerPublic } from '../contracts';
2+
import { arbOwnerPublicABI, arbOwnerPublicAddress } from '../contracts/ArbOwnerPublic';
33

4-
type ArbOwnerPublicABI = typeof arbOwnerPublic.abi;
54
export type IsChainOwnerParameters = {
65
address: Address;
76
};
87

9-
export type IsChainOwnerReturnType = ReadContractReturnType<ArbOwnerPublicABI, 'isChainOwner'>;
8+
export type IsChainOwnerReturnType = ReadContractReturnType<
9+
typeof arbOwnerPublicABI,
10+
'isChainOwner'
11+
>;
1012

1113
export async function isChainOwner<TChain extends Chain | undefined>(
1214
client: PublicClient<Transport, TChain>,
1315
args: IsChainOwnerParameters,
1416
): Promise<IsChainOwnerReturnType> {
1517
return client.readContract({
16-
abi: arbOwnerPublic.abi,
18+
abi: arbOwnerPublicABI,
1719
functionName: 'isChainOwner',
18-
address: arbOwnerPublic.address,
20+
address: arbOwnerPublicAddress,
1921
args: [args.address],
2022
});
2123
}

0 commit comments

Comments
 (0)