initial ws server with lookupToken
This commit is contained in:
42
abi.js
Normal file
42
abi.js
Normal file
@@ -0,0 +1,42 @@
|
||||
export const erc20Abi = [
|
||||
'function name() view returns (string)',
|
||||
'function symbol() view returns (string)',
|
||||
'function decimals() view returns (uint8)',
|
||||
'function totalSupply() view returns (uint256)',
|
||||
'function balanceOf(address) view returns (uint256)',
|
||||
'function transfer(address,uint256) returns (bool)',
|
||||
'function transferFrom(address,address,uint256) returns (bool)',
|
||||
'function approve(address,uint256) returns (bool success)',
|
||||
'function allowance(address,address) view returns (uint256)',
|
||||
'event Transfer(address indexed,address indexed,uint256)',
|
||||
'event Approval(address indexed,address indexed,uint256)',
|
||||
]
|
||||
|
||||
|
||||
const TimedOrderSpec = '(' +
|
||||
'address tokenIn,' +
|
||||
'address tokenOut,' +
|
||||
'uint24 fee,' +
|
||||
'uint32 deadline,' +
|
||||
'uint32 leeway,' +
|
||||
'uint160 minSqrtPriceX96,' +
|
||||
'uint160 maxSqrtPriceX96,' +
|
||||
'uint8 numTranches,' +
|
||||
'uint256 amount,' +
|
||||
'bool amountIsInput' +
|
||||
')'
|
||||
|
||||
export const timedOrderAbi = [
|
||||
'event TimedOrderCreated (address owner, uint64 index, Spec spec)',
|
||||
'event TimedOrderFilled (address owner, uint64 index, uint256 amountIn, uint256 amountOut)',
|
||||
'event TimedOrderCompleted (address owner, uint64 index)',
|
||||
'event TimedOrderError (address owner, uint64 index, string reason)',
|
||||
`timedOrder(${TimedOrderSpec}) returns (uint64 index)`,
|
||||
]
|
||||
|
||||
|
||||
export const abi = {
|
||||
'ERC20': erc20Abi,
|
||||
'TimedOrder': timedOrderAbi,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user