Skip to content

Commit

Permalink
bugfix: feeRouterDeployChildToParentRewardRouter using wrong client
Browse files Browse the repository at this point in the history
  • Loading branch information
TucksonDev committed Dec 11, 2024
1 parent d6ccb3b commit 977b1cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/setup-aep-fee-router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
arbOwnerPublicActions,
arbGasInfoPublicActions,
parentChainIsArbitrum,
ParentChainId,
} from '@arbitrum/orbit-sdk';
import { sanitizePrivateKey, getParentChainFromId } from '@arbitrum/orbit-sdk/utils';
import { config } from 'dotenv';
Expand Down Expand Up @@ -74,7 +75,7 @@ const parentChainTargetAddress = getAddress(process.env.PARENT_CHAIN_TARGET_ADDR

async function main() {
// Verify that this is an orbit chain settling to a non-Arbitrum chain
if (parentChainIsArbitrum(parentChainPublicClient.chain.id)) {
if (parentChainIsArbitrum(parentChainPublicClient.chain.id as ParentChainId)) {
throw new Error(
'This script is intended to be used only by Orbit chains settling to non Arbitrum chains.',
);
Expand Down
2 changes: 1 addition & 1 deletion src/feeRouterDeployChildToParentRewardRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function feeRouterDeployChildToParentRewardRouter<TChain extends Ch
// obtain the token address in the Orbit chain
// (we can use either gateway router to obtain the "L2 token address")
const orbitChainTokenAddress = await parentChainPublicClient.readContract({
address: orbitChainGatewayRouter,
address: tokenBridgeContracts.parentChainContracts.router,
abi: parseAbi(['function calculateL2TokenAddress(address) view returns (address)']),
functionName: 'calculateL2TokenAddress',
args: [parentChainTokenAddress],
Expand Down

0 comments on commit 977b1cf

Please sign in to comment.