Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Changes to allow "votable" config for votable ERC20 warp routes #59

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/warp_tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ export const warpRouteConfig: WarpRouteConfig = {
type: TokenType.native, // TokenType.native or TokenType.collateral
// If type is collateral, a token address is required:
// address: '0x123...'

// Optionally, specify owner, mailbox, and interchainGasPaymaster addresses
// If not specified, the Permissionless Deployment artifacts or the SDK's defaults will be used
//votable:true, if you enable this option you will be able to delegate the voting power of the locked tokens

},
synthetics: [
{
chainName: 'anvil2',

// Optionally specify a name, symbol, and totalSupply
// If not specified, the base token's properties will be used

// Optionally, specify owner, mailbox, and interchainGasPaymaster addresses
// If not specified, the Permissionless Deployment artifacts or the SDK's defaults will be used
//votable:true, if you enable this option then ERC20 votable synthetic token will be deployed
},
],
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this whitespace change

4 changes: 2 additions & 2 deletions src/warp/WarpRouteDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ export class WarpRouteDeployer {

async deploy(): Promise<void> {
const { configMap, baseToken } = await this.buildHypERC20Config();

this.logger('Initiating HypERC20 deployments');
const deployer = new HypERC20Deployer(this.multiProvider);
await deployer.deploy(configMap);
this.logger('HypERC20 deployments complete');

this.writeDeploymentResult(
deployer.deployedContracts,
configMap,
Expand Down Expand Up @@ -101,6 +99,7 @@ export class WarpRouteDeployer {

const configMap: ChainMap<TokenConfig & RouterConfig> = {
[baseChainName]: {
votable: base.votable,
type: baseType,
token: baseTokenAddr,
owner,
Expand All @@ -122,6 +121,7 @@ export class WarpRouteDeployer {
for (const synthetic of synthetics) {
const sChainName = synthetic.chainName;
configMap[sChainName] = {
votable: synthetic.votable,
type: TokenType.synthetic,
name: synthetic.name || baseTokenMetadata.name,
symbol: synthetic.symbol || baseTokenMetadata.symbol,
Expand Down
3 changes: 3 additions & 0 deletions src/warp/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ type WarpBaseToken = {
} & Partial<ConnectionClientConfig>;

export interface WarpNativeTokenConfig extends WarpBaseToken {
votable?: boolean;
type: TokenType.native;
}

export interface WarpCollateralTokenConfig extends WarpBaseToken {
votable?: boolean;
type: TokenType.collateral;
address: string;
}

export type WarpSyntheticTokenConfig = {
votable?:boolean;
chainName: string;
name?: string;
symbol?: string;
Expand Down