Skip to content

Commit

Permalink
Fix add tokens
Browse files Browse the repository at this point in the history
Signed-off-by: deniallugo <[email protected]>
  • Loading branch information
Deniallugo committed Jun 1, 2021
1 parent 4afd2a9 commit fabd8b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/scripts/governance-add-erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function governanceAddToken(address: string) {
console.log('Adding new ERC20 token to network: ', address);

const tx = await deployer
.governanceContract(governorWallet)
.tokenGovernanceContract(governorWallet)
.addToken(address, { gasLimit: BigNumber.from('1000000') });
console.log('tx hash: ', tx.hash);
const receipt = await tx.wait();
Expand Down
8 changes: 7 additions & 1 deletion contracts/src.ts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import {
ZkSync,
ZkSyncFactory,
ForcedExit,
ForcedExitFactory
ForcedExitFactory,
TokenGovernanceFactory,
TokenGovernance
} from '../typechain';

export interface Contracts {
Expand Down Expand Up @@ -452,6 +454,10 @@ export class Deployer {
return GovernanceFactory.connect(this.addresses.Governance, signerOrProvider);
}

public tokenGovernanceContract(signerOrProvider: Signer | providers.Provider): TokenGovernance {
return TokenGovernanceFactory.connect(this.addresses.TokenGovernance, signerOrProvider);
}

public zkSyncContract(signerOrProvider: Signer | providers.Provider): ZkSync {
return ZkSyncFactory.connect(this.addresses.ZkSync, signerOrProvider);
}
Expand Down

0 comments on commit fabd8b2

Please sign in to comment.