Removes proxy prescription for Router (#403)

pull/420/head
Nam Chu Hoai 3 years ago committed by GitHub
parent d5bdd405c1
commit 93ca772226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      typescript/deploy/src/router/deploy.ts
  2. 9
      typescript/sdk/src/contracts.ts
  3. 17
      typescript/sdk/src/governance/contracts.ts

@ -7,7 +7,6 @@ import {
ChainMap,
ChainName,
MultiProvider,
RouterAddresses,
domains,
objMap,
promiseObjAll,
@ -21,7 +20,7 @@ import { Router, RouterConfig } from './types';
export abstract class AbacusRouterDeployer<
Networks extends ChainName,
Config extends RouterConfig,
Addresses extends RouterAddresses,
Addresses,
> extends AbacusAppDeployer<Networks, Config, Addresses> {
protected core?: AbacusCore<Networks>;

@ -1,10 +1,7 @@
import { Contract } from 'ethers';
import { Router__factory } from '@abacus-network/apps';
import {
AbacusConnectionManager__factory,
UpgradeBeaconController__factory,
} from '@abacus-network/core';
import { AbacusConnectionManager__factory } from '@abacus-network/core';
import { types } from '@abacus-network/utils';
import { Connection, ProxiedAddress } from './types';
@ -72,13 +69,11 @@ export abstract class AbacusContracts<
}
export type RouterAddresses = {
upgradeBeaconController: types.Address;
abacusConnectionManager: types.Address;
router: ProxiedAddress;
router: types.Address;
};
export const routerFactories: Factories<RouterAddresses> = {
router: Router__factory.connect,
abacusConnectionManager: AbacusConnectionManager__factory.connect,
upgradeBeaconController: UpgradeBeaconController__factory.connect,
};

@ -1,19 +1,24 @@
import { Call } from '..';
import { GovernanceRouter__factory } from '@abacus-network/apps';
import { UpgradeBeaconController__factory } from '@abacus-network/core';
import { types } from '@abacus-network/utils';
import {
AbacusContracts,
RouterAddresses,
routerFactories,
} from '../contracts';
import { AbacusContracts, routerFactories } from '../contracts';
import { ProxiedAddress } from '../types';
import { normalizeCall } from './utils';
export type GovernanceAddresses = RouterAddresses;
export type GovernanceAddresses = {
// Basically copy RouterAddresses
abacusConnectionManager: types.Address;
router: ProxiedAddress;
upgradeBeaconController: types.Address;
};
export const governanceFactories = {
...routerFactories,
upgradeBeaconController: UpgradeBeaconController__factory.connect,
router: GovernanceRouter__factory.connect,
};

Loading…
Cancel
Save