21 lines
		
	
	
		
			821 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			821 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
 | |
| import { artifacts, ForwarderContract } from '@0x/contracts-exchange-forwarder';
 | |
| import { BlockchainTestsEnvironment } from '@0x/contracts-test-utils';
 | |
| import { assetDataUtils } from '@0x/order-utils';
 | |
| 
 | |
| import { DeploymentManager } from '../utils/deployment_manager';
 | |
| 
 | |
| export async function deployForwarderAsync(
 | |
|     deployment: DeploymentManager,
 | |
|     environment: BlockchainTestsEnvironment,
 | |
| ): Promise<ForwarderContract> {
 | |
|     return await ForwarderContract.deployFrom0xArtifactAsync(
 | |
|         artifacts.Forwarder,
 | |
|         environment.provider,
 | |
|         deployment.txDefaults,
 | |
|         { ...exchangeArtifacts, ...artifacts },
 | |
|         deployment.exchange.address,
 | |
|         assetDataUtils.encodeERC20AssetData(deployment.tokens.weth.address),
 | |
|     );
 | |
| }
 |