@0x/contracts-asset-proxy: Create DexForwarderBridge bridge contract.
This commit is contained in:
27
contracts/asset-proxy/src/dex_forwarder_bridge.ts
Normal file
27
contracts/asset-proxy/src/dex_forwarder_bridge.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AbiEncoder, BigNumber } from '@0x/utils';
|
||||
|
||||
export interface DexForwaderBridgeCall {
|
||||
target: string;
|
||||
inputTokenAmount: BigNumber;
|
||||
outputTokenAmount: BigNumber;
|
||||
bridgeData: string;
|
||||
}
|
||||
|
||||
export interface DexForwaderBridgeData {
|
||||
inputToken: string;
|
||||
calls: DexForwaderBridgeCall[];
|
||||
}
|
||||
|
||||
export const dexForwarderBridgeDataEncoder = AbiEncoder.create([
|
||||
{ name: 'inputToken', type: 'address' },
|
||||
{
|
||||
name: 'calls',
|
||||
type: 'tuple[]',
|
||||
components: [
|
||||
{ name: 'target', type: 'address' },
|
||||
{ name: 'inputTokenAmount', type: 'uint256' },
|
||||
{ name: 'outputTokenAmount', type: 'uint256' },
|
||||
{ name: 'bridgeData', type: 'bytes' },
|
||||
],
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user