Skip to content

feat: add spread profit, fill and sort #436

feat: add spread profit, fill and sort

feat: add spread profit, fill and sort #436

Triggered via pull request October 18, 2024 10:00
Status Failure
Total duration 2m 11s
Artifacts

ci.yaml

on: pull_request
Matrix: Check TS
Matrix: NPM Test
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 2 warnings
add-liquidity.test.ts > Add liquidity without swap - 1: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ add-liquidity.test.ts:31:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountB',
add-liquidity.test.ts > Add liquidity without swap - 2: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ add-liquidity.test.ts:193:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountB'
add-liquidity.test.ts > Add liquidity one side with swap: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ add-liquidity.test.ts:355:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountB'
add-liquidity.test.ts > Add liquidity two sides with swap: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ add-liquidity.test.ts:593:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountB'
adjust-order-price.test.ts > Adjust order price: src/utils/open.ts#L26
ContractFunctionExecutionError: The contract function "isOpened" returned no data ("0x"). This could be due to any of the following: - The contract does not have the function "isOpened", - The parameters passed to the contract function may be invalid, or - The address is not a contract. Contract Call: address: 0xAA9575d63dFC224b9583fC303dB3188C08d5C85A function: isOpened(uint192 id) args: (3925075528294375433585636434806582627786581032830806271349) Docs: https://viem.sh/docs/contract/readContract Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ readContract ../node_modules/viem/actions/public/readContract.ts:128:11 ❯ Module.fetchIsMarketOpened ../src/utils/open.ts:26:26 ❯ getBook ../src/apis/market.ts:74:30 ❯ Module.fetchMarket ../src/apis/market.ts:118:30 ❯ Module.fetchPool ../src/apis/pool.ts:57:7 ❯ Module.getPool ../src/view.ts:185:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/readContract', metaMessages: [ 'This could be due to any of the following:', ' - The contract does not have the function "isOpened",', ' - The parameters passed to the contract function may be invalid, or', ' - The address is not a contract.', ' ', 'Contract Call:', ' address: 0xAA9575d63dFC224b9583fC303dB3188C08d5C85A\n function: isOpened(uint192 id)\n args: (3925075528294375433585636434806582627786581032830806271349)' ], shortMessage: 'The contract function "isOpened" returned no data ("0x").', version: '[email protected]', abi: [ { inputs: [ { internalType: 'BookId', name: 'id', type: 'uint192' } ], name: 'isOpened', outputs: [ { internalType: 'bool', name: '', type: 'bool' } ], stateMutability: 'view', type: 'function' } ], args: [ 3925075528294375433585636434806582627786581032830806271349n ], contractAddress: '0xAA9575d63dFC224b9583fC303dB3188C08d5C85A', formattedArgs: undefined, functionName: 'isOpened', sender: undefined, walk: 'Function<walk>' } Caused by: ContractFunctionZeroDataError: The contract function "isOpened" returned no data ("0x"). This could be due to any of the following: - The contract does not have the function "isOpened", - The parameters passed to the contract function may be invalid, or - The address is not a contract. Version: [email protected] ❯ ../node_modules/viem/utils/errors/getContractError.ts:57:14 ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:70:5 ❯ readContract ../node_modules/viem/actions/public/readContract.ts:128:11 ❯ Module.fetchIsMarketOpened ../src/utils/open.ts:26:26 ❯ getBook ../src/apis/market.ts:74:30 ❯ Module.fetchMarket ../src/apis/market.ts:118:30 ❯ Module.fetchPool ../src/apis/pool.ts:57:7 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: [ 'This could be due to any of the following:', ' - The contract does not have the function "isOpened",', ' - The parameters passed to the contract function may be invalid, or', ' - The address is not a contract.' ], shortMessage: 'The contract function "isOpened" returned no data ("0x").', version: '[email protected]', walk: 'Function<walk>' }
open.test.ts > try open pool: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x6cf422b2bb53aafd274d55740e6c8437055eba392cb2f69633c35462ab920bb7) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ open.test.ts:140:21 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x6cf422b2bb53aafd274d55740e6c8437055eba392cb2f69633c35462ab920bb7)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountB', type: '
refill-order.test.ts > Refill order: src/utils/open.ts#L26
ContractFunctionExecutionError: The contract function "isOpened" returned no data ("0x"). This could be due to any of the following: - The contract does not have the function "isOpened", - The parameters passed to the contract function may be invalid, or - The address is not a contract. Contract Call: address: 0xAA9575d63dFC224b9583fC303dB3188C08d5C85A function: isOpened(uint192 id) args: (3925075528294375433585636434806582627786581032830806271349) Docs: https://viem.sh/docs/contract/readContract Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ readContract ../node_modules/viem/actions/public/readContract.ts:128:11 ❯ Module.fetchIsMarketOpened ../src/utils/open.ts:26:26 ❯ getBook ../src/apis/market.ts:74:30 ❯ Module.fetchMarket ../src/apis/market.ts:118:30 ❯ Module.fetchPool ../src/apis/pool.ts:57:7 ❯ Module.addLiquidity ../src/call.ts:1126:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/readContract', metaMessages: [ 'This could be due to any of the following:', ' - The contract does not have the function "isOpened",', ' - The parameters passed to the contract function may be invalid, or', ' - The address is not a contract.', ' ', 'Contract Call:', ' address: 0xAA9575d63dFC224b9583fC303dB3188C08d5C85A\n function: isOpened(uint192 id)\n args: (3925075528294375433585636434806582627786581032830806271349)' ], shortMessage: 'The contract function "isOpened" returned no data ("0x").', version: '[email protected]', abi: [ { inputs: [ { internalType: 'BookId', name: 'id', type: 'uint192' } ], name: 'isOpened', outputs: [ { internalType: 'bool', name: '', type: 'bool' } ], stateMutability: 'view', type: 'function' } ], args: [ 3925075528294375433585636434806582627786581032830806271349n ], contractAddress: '0xAA9575d63dFC224b9583fC303dB3188C08d5C85A', formattedArgs: undefined, functionName: 'isOpened', sender: undefined, walk: 'Function<walk>' } Caused by: ContractFunctionZeroDataError: The contract function "isOpened" returned no data ("0x"). This could be due to any of the following: - The contract does not have the function "isOpened", - The parameters passed to the contract function may be invalid, or - The address is not a contract. Version: [email protected] ❯ ../node_modules/viem/utils/errors/getContractError.ts:57:14 ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:70:5 ❯ readContract ../node_modules/viem/actions/public/readContract.ts:128:11 ❯ Module.fetchIsMarketOpened ../src/utils/open.ts:26:26 ❯ getBook ../src/apis/market.ts:74:30 ❯ Module.fetchMarket ../src/apis/market.ts:118:30 ❯ Module.fetchPool ../src/apis/pool.ts:57:7 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: undefined, metaMessages: [ 'This could be due to any of the following:', ' - The contract does not have the function "isOpened",', ' - The parameters passed to the contract function may be invalid, or', ' - The address is not a contract.' ], shortMessage: 'The contract function "isOpened" returned no data ("0x").', version: '[email protected]', walk: 'Function<walk>' }
remove-liquidity.test.ts > Remove liquidity: src/apis/pool.ts#L69
ContractFunctionExecutionError: Position `320` is out of bounds (`0 < position < 320`). Contract Call: address: 0xCF556d850277BC579c99C0729F4E72e62C57D811 function: getPool(bytes32 key) args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d) Docs: https://viem.sh/docs/contract/multicall Version: [email protected] ❯ getContractError ../node_modules/viem/utils/errors/getContractError.ts:72:10 ❯ multicall ../node_modules/viem/actions/public/multicall.ts:271:23 ❯ Module.fetchPool ../src/apis/pool.ts:69:7 ❯ Module.getPool ../src/view.ts:185:16 ❯ remove-liquidity.test.ts:31:16 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { details: undefined, docsPath: '/docs/contract/multicall', metaMessages: [ 'Contract Call:', ' address: 0xCF556d850277BC579c99C0729F4E72e62C57D811\n function: getPool(bytes32 key)\n args: (0x7f1a575ceb4d9d07a92abe57886551352626b6b600bcada45fa83c3e58cc7e3d)' ], shortMessage: 'Position `320` is out of bounds (`0 < position < 320`).', version: '[email protected]', abi: [ { inputs: [ { internalType: 'contract IBookManager', name: 'bookManager_', type: 'address' }, { internalType: 'address', name: 'initialOwner_', type: 'address' } ], stateMutability: 'nonpayable', type: 'constructor' }, { inputs: [], name: 'AlreadyOpened', type: 'error' }, { inputs: [], name: 'ERC20TransferFailed', type: 'error' }, { inputs: [], name: 'InvalidAmount', type: 'error' }, { inputs: [], name: 'InvalidBookPair', type: 'error' }, { inputs: [], name: 'InvalidHook', type: 'error' }, { inputs: [], name: 'InvalidLockAcquiredSender', type: 'error' }, { inputs: [], name: 'InvalidLockCaller', type: 'error' }, { inputs: [], name: 'InvalidMaker', type: 'error' }, { inputs: [], name: 'InvalidStrategy', type: 'error' }, { inputs: [], name: 'InvalidTick', type: 'error' }, { inputs: [], name: 'InvalidValue', type: 'error' }, { inputs: [], name: 'LockFailure', type: 'error' }, { inputs: [], name: 'NativeTransferFailed', type: 'error' }, { inputs: [], name: 'NotSelf', type: 'error' }, { inputs: [ { internalType: 'address', name: 'owner', type: 'address' } ], name: 'OwnableInvalidOwner', type: 'error' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'OwnableUnauthorizedAccount', type: 'error' }, { inputs: [], name: 'Paused', type: 'error' }, { inputs: [ { internalType: 'uint8', name: 'bits', type: 'uint8' }, { internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'SafeCastOverflowedUintDowncast', type: 'error' }, { inputs: [ { internalType: 'address', name: 'token', type: 'address' } ], name: 'SafeERC20FailedOperation', type: 'error' }, { inputs: [], name: 'Slippage', type: 'error' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'owner', type: 'address' }, { indexed: true, internalType: 'address', name: 'spender', type: 'address' }, { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'Approval', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'user', type: 'address' }, { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'amountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'amountB', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'lpAmount', type: 'uint256' } ], name: 'Burn', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'canceledAmountB', type: 'uint256' } ], name: 'Cancel', type: 'event' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'bytes32', name: 'key', type: 'bytes32' }, { indexed: false, internalType: 'uint256', name: 'claimedAmountA', type: 'uint256' }, { indexed: false, internalType: 'uint256', name: 'claimedAmount
NPM Test (18.10)
Process completed with exit code 1.
Check TS (18.10)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
NPM Test (18.10)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/