diff --git a/graphql-env.d.ts b/graphql-env.d.ts new file mode 100644 index 0000000..efbe2af --- /dev/null +++ b/graphql-env.d.ts @@ -0,0 +1,53 @@ +/* eslint-disable */ +/* prettier-ignore */ + +/** An IntrospectionQuery representation of your schema. + * + * @remarks + * This is an introspection of your schema saved as a file by GraphQLSP. + * It will automatically be used by `gql.tada` to infer the types of your GraphQL documents. + * If you need to reuse this data or update your `scalars`, update `tadaOutputLocation` to + * instead save to a .ts instead of a .d.ts file. + */ +export type introspection = { + name: never; + query: 'Query'; + mutation: never; + subscription: never; + types: { + 'BigInt': unknown; + 'Boolean': unknown; + 'ConstantProductData': { kind: 'OBJECT'; name: 'ConstantProductData'; fields: { 'appData': { name: 'appData'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'minTradedToken0': { name: 'minTradedToken0'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'orderId': { name: 'orderId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'priceOracle': { name: 'priceOracle'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'priceOracleData': { name: 'priceOracleData'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'token0': { name: 'token0'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Token'; ofType: null; }; } }; 'token0Id': { name: 'token0Id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'token1': { name: 'token1'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Token'; ofType: null; }; } }; 'token1Id': { name: 'token1Id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'ConstantProductDataFilter': { kind: 'INPUT_OBJECT'; name: 'ConstantProductDataFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ConstantProductDataFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ConstantProductDataFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'token0Id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'token0Id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token0Id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'token1Id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'token1Id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'token1Id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'minTradedToken0_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'minTradedToken0_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'minTradedToken0_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'priceOracle'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracle_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracle_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'priceOracle_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'priceOracle_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracle_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracle_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracle_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'priceOracleData_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'priceOracleData_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'priceOracleData_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'appData_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'appData_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'ConstantProductDataPage': { kind: 'OBJECT'; name: 'ConstantProductDataPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ConstantProductData'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'Int': unknown; + 'JSON': unknown; + 'Order': { kind: 'OBJECT'; name: 'Order'; fields: { 'blockNumber': { name: 'blockNumber'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'blockTimestamp': { name: 'blockTimestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'constantProductData': { name: 'constantProductData'; type: { kind: 'OBJECT'; name: 'ConstantProductData'; ofType: null; } }; 'constantProductDataId': { name: 'constantProductDataId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'decodedSuccess': { name: 'decodedSuccess'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hash': { name: 'hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'orderHandler': { name: 'orderHandler'; type: { kind: 'OBJECT'; name: 'OrderHandler'; ofType: null; } }; 'orderHandlerId': { name: 'orderHandlerId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'salt': { name: 'salt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'staticInput': { name: 'staticInput'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'stopLossData': { name: 'stopLossData'; type: { kind: 'OBJECT'; name: 'StopLossOrder'; ofType: null; } }; 'stopLossDataId': { name: 'stopLossDataId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'txHash': { name: 'txHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'user': { name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'User'; ofType: null; }; } }; 'userId': { name: 'userId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'OrderFilter': { kind: 'INPUT_OBJECT'; name: 'OrderFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OrderFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OrderFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_not'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'blockNumber'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockNumber_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockNumber_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'blockNumber_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'blockNumber_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockNumber_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockNumber_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockNumber_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'blockTimestamp_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'blockTimestamp_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'blockTimestamp_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'hash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hash_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hash_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'hash_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'hash_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hash_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hash_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'hash_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txHash_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'txHash_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'txHash_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'salt_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'salt_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'salt_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'userId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'userId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'userId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'staticInput_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'staticInput_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'staticInput_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'decodedSuccess'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'decodedSuccess_not'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'decodedSuccess_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'decodedSuccess_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'stopLossDataId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'stopLossDataId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'stopLossDataId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'stopLossDataId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderHandlerId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderHandlerId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderHandlerId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'constantProductDataId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'constantProductDataId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'constantProductDataId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'OrderHandler': { kind: 'OBJECT'; name: 'OrderHandler'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'type': { name: 'type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'OrderHandlerFilter': { kind: 'INPUT_OBJECT'; name: 'OrderHandlerFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OrderHandlerFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'OrderHandlerFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'type_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'type_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'type_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_not'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; + 'OrderHandlerPage': { kind: 'OBJECT'; name: 'OrderHandlerPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OrderHandler'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'OrderPage': { kind: 'OBJECT'; name: 'OrderPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Order'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'PageInfo': { kind: 'OBJECT'; name: 'PageInfo'; fields: { 'endCursor': { name: 'endCursor'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'hasNextPage': { name: 'hasNextPage'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasPreviousPage': { name: 'hasPreviousPage'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'startCursor': { name: 'startCursor'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; + 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { '_meta': { name: '_meta'; type: { kind: 'OBJECT'; name: '_meta'; ofType: null; } }; 'constantProductData': { name: 'constantProductData'; type: { kind: 'OBJECT'; name: 'ConstantProductData'; ofType: null; } }; 'constantProductDatas': { name: 'constantProductDatas'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ConstantProductDataPage'; ofType: null; }; } }; 'order': { name: 'order'; type: { kind: 'OBJECT'; name: 'Order'; ofType: null; } }; 'orderHandler': { name: 'orderHandler'; type: { kind: 'OBJECT'; name: 'OrderHandler'; ofType: null; } }; 'orderHandlers': { name: 'orderHandlers'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OrderHandlerPage'; ofType: null; }; } }; 'orders': { name: 'orders'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OrderPage'; ofType: null; }; } }; 'stopLossOrder': { name: 'stopLossOrder'; type: { kind: 'OBJECT'; name: 'StopLossOrder'; ofType: null; } }; 'stopLossOrders': { name: 'stopLossOrders'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StopLossOrderPage'; ofType: null; }; } }; 'token': { name: 'token'; type: { kind: 'OBJECT'; name: 'Token'; ofType: null; } }; 'tokens': { name: 'tokens'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenPage'; ofType: null; }; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'users': { name: 'users'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'UserPage'; ofType: null; }; } }; }; }; + 'StopLossOrder': { kind: 'OBJECT'; name: 'StopLossOrder'; fields: { 'appData': { name: 'appData'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'buyTokenPriceOracle': { name: 'buyTokenPriceOracle'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'executedTokenBuyAmount': { name: 'executedTokenBuyAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'executedTokenSellAmount': { name: 'executedTokenSellAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'filledPctBps': { name: 'filledPctBps'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'isPartiallyFillable': { name: 'isPartiallyFillable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isSellOrder': { name: 'isSellOrder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'maxTimeSinceLastOracleUpdate': { name: 'maxTimeSinceLastOracleUpdate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'orderId': { name: 'orderId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'orderUid': { name: 'orderUid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'sellTokenPriceOracle': { name: 'sellTokenPriceOracle'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'strike': { name: 'strike'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'to': { name: 'to'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'tokenBuy': { name: 'tokenBuy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Token'; ofType: null; }; } }; 'tokenBuyAmount': { name: 'tokenBuyAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'tokenBuyId': { name: 'tokenBuyId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'tokenSell': { name: 'tokenSell'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Token'; ofType: null; }; } }; 'tokenSellAmount': { name: 'tokenSellAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'tokenSellId': { name: 'tokenSellId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'validTo': { name: 'validTo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; }; }; + 'StopLossOrderFilter': { kind: 'INPUT_OBJECT'; name: 'StopLossOrderFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'StopLossOrderFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'StopLossOrderFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tokenSellId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tokenSellId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tokenBuyId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'tokenBuyId_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyId_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'tokenSellAmount_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'tokenSellAmount_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenSellAmount_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'tokenBuyAmount_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'tokenBuyAmount_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'tokenBuyAmount_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'executedTokenSellAmount_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'executedTokenSellAmount_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenSellAmount_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'executedTokenBuyAmount_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'executedTokenBuyAmount_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'executedTokenBuyAmount_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'filledPctBps_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'filledPctBps_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'filledPctBps_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'appData'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'appData_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'appData_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'appData_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'to_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'to_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'to_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'isSellOrder'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'isSellOrder_not'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'isSellOrder_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'isSellOrder_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'isPartiallyFillable'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'isPartiallyFillable_not'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'isPartiallyFillable_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'isPartiallyFillable_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'validTo'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'validTo_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'validTo_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'validTo_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'validTo_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'validTo_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'validTo_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'validTo_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'sellTokenPriceOracle_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'sellTokenPriceOracle_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'sellTokenPriceOracle_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'buyTokenPriceOracle_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'buyTokenPriceOracle_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'buyTokenPriceOracle_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'strike'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'strike_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'strike_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'strike_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'strike_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'strike_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'strike_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'strike_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_not'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_gt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_lt'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'maxTimeSinceLastOracleUpdate_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'orderUid'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderUid_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'orderUid_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'orderUid_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'StopLossOrderPage': { kind: 'OBJECT'; name: 'StopLossOrderPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'StopLossOrder'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'String': unknown; + 'Token': { kind: 'OBJECT'; name: 'Token'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'decimals': { name: 'decimals'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'symbol': { name: 'symbol'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; + 'TokenFilter': { kind: 'INPUT_OBJECT'; name: 'TokenFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TokenFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'TokenFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_gt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_lt'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_gte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_lte'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_not'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'name_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'symbol_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'symbol_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'symbol_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'decimals'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decimals_not'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decimals_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'decimals_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'decimals_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decimals_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decimals_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'decimals_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; + 'TokenPage': { kind: 'OBJECT'; name: 'TokenPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Token'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + 'User': { kind: 'OBJECT'; name: 'User'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'orders': { name: 'orders'; type: { kind: 'OBJECT'; name: 'OrderPage'; ofType: null; } }; }; }; + 'UserFilter': { kind: 'INPUT_OBJECT'; name: 'UserFilter'; isOneOf: false; inputFields: [{ name: 'AND'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserFilter'; ofType: null; }; }; defaultValue: null }, { name: 'OR'; type: { kind: 'LIST'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserFilter'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'address_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not_contains'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not_starts_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'address_not_ends_with'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_not'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_not_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }, { name: 'chainId_gt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lt'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_gte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'chainId_lte'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }]; }; + 'UserPage': { kind: 'OBJECT'; name: 'UserPage'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'User'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; + '_meta': { kind: 'OBJECT'; name: '_meta'; fields: { 'status': { name: 'status'; type: { kind: 'SCALAR'; name: 'JSON'; ofType: null; } }; }; }; + }; +}; + +import * as gqlTada from "gql.tada"; + +declare module "gql.tada" { + interface setupSchema { + introspection: introspection; + } +} diff --git a/package.json b/package.json index 71f762d..ce76279 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "cmdk": "^0.2.1", "embla-carousel-react": "8.1.7", "gql": "^1.1.2", + "gql.tada": "^1.8.2", "graphql-codegen-plugin-typescript-swr": "^0.8.5", "graphql-request": "6.1.0", "graphql-tag": "^2.12.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c8b0a6..74aabab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,7 +136,7 @@ importers: version: 6.4.6(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.11)(ts-node@9.1.1(typescript@5.5.3))) '@wagmi/core': specifier: ^2.12.2 - version: 2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) babel-plugin-react-compiler: specifier: 0.0.0-experimental-696af53-20240625 version: 0.0.0-experimental-696af53-20240625 @@ -155,6 +155,9 @@ importers: gql: specifier: ^1.1.2 version: 1.1.2 + gql.tada: + specifier: ^1.8.2 + version: 1.8.2(graphql@15.8.0)(svelte@4.2.18)(typescript@5.5.3) graphql-codegen-plugin-typescript-swr: specifier: ^0.8.5 version: 0.8.5(graphql@15.8.0)(react@19.0.0-rc-df5f2736-20240712) @@ -196,7 +199,7 @@ importers: version: 3.39.3(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712) react-resizable-panels: specifier: ^2.0.21 - version: 2.0.21(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712) + version: 2.0.22(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712) reactflow: specifier: ^11.11.4 version: 11.11.4(@types/react@18.3.3)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712) @@ -220,13 +223,13 @@ importers: version: 0.9.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712) viem: specifier: ^2.17.5 - version: 2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + version: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) vocs: specifier: 1.0.0-alpha.55 version: 1.0.0-alpha.55(@types/node@20.14.11)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(terser@5.31.2)(ts-node@9.1.1(typescript@5.5.3))(typescript@5.5.3) wagmi: specifier: ^2.11.3 - version: 2.11.3(@tanstack/query-core@5.51.9)(@tanstack/react-query@5.51.9(react@19.0.0-rc-df5f2736-20240712))(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + version: 2.12.0(@tanstack/query-core@5.51.9)(@tanstack/react-query@5.51.9(react@19.0.0-rc-df5f2736-20240712))(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) zod: specifier: ^3.23.8 version: 3.23.8 @@ -330,6 +333,20 @@ importers: packages: + '@0no-co/graphql.web@1.0.7': + resolution: {integrity: sha512-E3Qku4mTzdrlwVWGPxklDnME5ANrEGetvYw4i2GCRlppWXXE4QD66j7pwb8HelZwS6LnqEChhrSOGCXpbiu6MQ==} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 + peerDependenciesMeta: + graphql: + optional: true + + '@0no-co/graphqlsp@1.12.12': + resolution: {integrity: sha512-BmCAc/q3tQcIwXxKoxubYaB23s2fWMMmNGSlY9mgQvWiReBS8ZutPZSf11OADfwTv1J1JIazU6q6OFX+cEp8PQ==} + peerDependencies: + graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 + typescript: ^5.0.0 + '@aashutoshrathi/word-wrap@1.2.6': resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} @@ -1867,6 +1884,19 @@ packages: '@floating-ui/utils@0.2.1': resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + '@gql.tada/cli-utils@1.5.1': + resolution: {integrity: sha512-JVLpoXLa4msrE7MHnmW/7fYnIl8dncLom8T/Ghsxu+Kz5iMGnzK2joJN5cZt4ewCAqfCV3HZZ0VH189OalGd9g==} + peerDependencies: + '@0no-co/graphqlsp': ^1.12.9 + graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 + typescript: ^5.0.0 + + '@gql.tada/internal@1.0.4': + resolution: {integrity: sha512-tq0rgoqjhdVqKWEsbrkiX7Qpp5gA4/Br9r9TVBeh3WpJIcuGh5U48UjB4IOxtXBePZdX8E0oc07GjOid/P60Wg==} + peerDependencies: + graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 + typescript: ^5.0.0 + '@graphql-codegen/add@5.0.3': resolution: {integrity: sha512-SxXPmramkth8XtBlAHu4H4jYcYXM/o3p01+psU+0NADQowA8jtYkK6MW5rV6T+CxkEaNZItfSmZRPgIuypcqnA==} peerDependencies: @@ -4459,10 +4489,33 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 - '@wagmi/connectors@5.0.26': - resolution: {integrity: sha512-aGc3oDQPQwVqJr7S/7IU7rF0bA61OYXGPLzj30Y3MSmmEWXtAEgKpqkhIwiEdYQAMnlR3ukbqROq8qmUm/iYQg==} + '@volar/language-core@2.4.0-alpha.18': + resolution: {integrity: sha512-JAYeJvYQQROmVRtSBIczaPjP3DX4QW1fOqW1Ebs0d3Y3EwSNRglz03dSv0Dm61dzd0Yx3WgTW3hndDnTQqgmyg==} + + '@volar/source-map@2.4.0-alpha.18': + resolution: {integrity: sha512-MTeCV9MUwwsH0sNFiZwKtFrrVZUK6p8ioZs3xFzHc2cvDXHWlYN3bChdQtwKX+FY2HG6H3CfAu1pKijolzIQ8g==} + + '@vue/compiler-core@3.4.33': + resolution: {integrity: sha512-MoIREbkdPQlnGfSKDMgzTqzqx5nmEjIc0ydLVYlTACGBsfvOJ4tHSbZXKVF536n6fB+0eZaGEOqsGThPpdvF5A==} + + '@vue/compiler-dom@3.4.33': + resolution: {integrity: sha512-GzB8fxEHKw0gGet5BKlpfXEqoBnzSVWwMnT+dc25wE7pFEfrU/QsvjZMP9rD4iVXHBBoemTct8mN0GJEI6ZX5A==} + + '@vue/language-core@2.0.28': + resolution: {integrity: sha512-0z4tyCCaqqPbdyz0T4yTFQeLpCo4TOM/ZHAC3geGLHeCiFAjVbROB9PiEtrXR1AoLObqUPFHSmKZeWtEMssSqw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/shared@3.4.33': + resolution: {integrity: sha512-aoRY0jQk3A/cuvdkodTrM4NMfxco8n55eG4H7ML/CRy7OryHfiqvug4xrCBBMbbN+dvXAetDDwZW9DXWWjBntA==} + + '@wagmi/connectors@5.1.0': + resolution: {integrity: sha512-5ULOFUxPa9GE4zmROuhYCpeL01PDBG283Kn25IME0lcO/ptIizMs1uBafnpTzVDlLJ31MCdSP0RTpnmGt6omjg==} peerDependencies: - '@wagmi/core': 2.12.2 + '@wagmi/core': 2.13.0 typescript: '>=5.0.4' viem: 2.x peerDependenciesMeta: @@ -4481,6 +4534,18 @@ packages: typescript: optional: true + '@wagmi/core@2.13.0': + resolution: {integrity: sha512-44HrRbwFzPF/EZMvIzdkdIYmJM93GjG1NWxAc+eCTRMn6LwZSVkw8XSJIkHN7xqf0CzikfQW1t16miJ0T+wRpw==} + peerDependencies: + '@tanstack/query-core': '>=5.0.0' + typescript: '>=5.0.4' + viem: 2.x + peerDependenciesMeta: + '@tanstack/query-core': + optional: true + typescript: + optional: true + '@walletconnect/core@2.13.0': resolution: {integrity: sha512-blDuZxQenjeXcVJvHxPznTNl6c/2DO4VNrFnus+qHmO6OtT5lZRowdMtlCaCNb1q0OxzgrmBDcTOCbFcCpio/g==} @@ -4850,6 +4915,10 @@ packages: axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + babel-core@7.0.0-bridge.0: resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: @@ -5241,6 +5310,9 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + code-red@1.0.4: + resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} + collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} @@ -5330,6 +5402,9 @@ packages: resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==} engines: {node: '>= 0.8.0'} + computeds@0.0.1: + resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -5459,6 +5534,10 @@ packages: css-system-font-keywords@1.0.0: resolution: {integrity: sha512-1umTtVd/fXS25ftfjB71eASCrYhilmEsvDEI6wG/QplnmlfmVM5HkZ/ZX46DT5K3eblFPgLUHt5BRCb0YXkSFA==} + css-tree@2.3.1: + resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + css-what@6.1.0: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} @@ -5599,6 +5678,9 @@ packages: dayjs@1.11.11: resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} + de-indent@1.0.2: + resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} + debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} @@ -5654,6 +5736,9 @@ packages: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} + dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + dedent@1.5.1: resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} peerDependencies: @@ -6632,6 +6717,12 @@ packages: gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gql.tada@1.8.2: + resolution: {integrity: sha512-LLt+2RcLY6i+Rq+LQQwx3uiEAPfA+pmEaAo/bJjUdaV1CVJBy3Wowds6GHeerW5kvekRM/XdbPTJw5OvnLq/DQ==} + hasBin: true + peerDependencies: + typescript: ^5.0.0 + gql@1.1.2: resolution: {integrity: sha512-fF+1HtQqLdv1LtA6fntKXzuUPVHaQYoVwL60bKpZK4VCpTVcdMijOxSLPUKjj2PAyU1vrHAk7D9EpkBw89CyoQ==} engines: {node: '>= 0.4.0'} @@ -6786,6 +6877,10 @@ packages: hastscript@8.0.0: resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + header-case@2.0.4: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} @@ -7674,6 +7769,9 @@ packages: resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} engines: {node: '>=4'} + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -7764,6 +7862,9 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + magic-string@0.30.10: + resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + make-dir@2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -7871,6 +7972,9 @@ packages: mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + mdn-data@2.0.30: + resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + media-query-parser@2.0.2: resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==} @@ -8214,6 +8318,9 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + multibase@4.0.6: resolution: {integrity: sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==} engines: {node: '>=12.0.0', npm: '>=6.0.0'} @@ -8614,6 +8721,9 @@ packages: pascal-case@3.1.2: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-case@3.0.4: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} @@ -9158,8 +9268,8 @@ packages: '@types/react': optional: true - react-resizable-panels@2.0.21: - resolution: {integrity: sha512-rFRjZ2sJ+iut0hY+5NtIxoIRlQqTWqZ6rMNahaZeZDpRPQyg8xiKjrlvXMq52WswFwpg47GFJcxn7f9uAFnZsQ==} + react-resizable-panels@2.0.22: + resolution: {integrity: sha512-G8x8o7wjQxCG+iF4x4ngKVBpe0CY+DAZ/SaiDoqBEt0yuKJe9OE/VVYMBMMugQ3GyQ65NnSJt23tujlaZZe75A==} peerDependencies: react: ^16.14.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 @@ -9922,6 +10032,16 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svelte2tsx@0.7.13: + resolution: {integrity: sha512-aObZ93/kGAiLXA/I/kP+x9FriZM+GboB/ReOIGmLNbVGEd2xC+aTCppm3mk1cc9I/z60VQf7b2QDxC3jOXu3yw==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + + svelte@4.2.18: + resolution: {integrity: sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==} + engines: {node: '>=16'} + svg-arc-to-cubic-bezier@3.2.0: resolution: {integrity: sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==} @@ -10536,8 +10656,8 @@ packages: vfile@6.0.1: resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - viem@2.17.5: - resolution: {integrity: sha512-m0QIKQF1uqTFWAYNeAdhNUBFMaIs0Mwhu2VmZuXmBMkzJ0IL0ViblLH13JRwbDnOaY82KYzNhCARmfnLBWVdkA==} + viem@2.17.10: + resolution: {integrity: sha512-nubTeRBI3wsmYGemlg9PsbhunTSJSYUlq8VjzIQkbowCSPSd1bqzVeUU0qEOXsGtgRiFfBzXkkxFknZtBOAx/Q==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -10594,12 +10714,15 @@ packages: vt-pbf@3.1.3: resolution: {integrity: sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==} + vue-template-compiler@2.7.16: + resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} - wagmi@2.11.3: - resolution: {integrity: sha512-fUY9ABidNGPE5f5fRcs6yn0h7Y/rWq4XzJ7YhrYSHwwDji/ujkeVz54SA8w+UUWgCVn8GIvDjYC0tFaxGO5W8A==} + wagmi@2.12.0: + resolution: {integrity: sha512-DsRcFWtz3fVPRWPGL8AMqN8hkcO/PCLn/T1E0xa8K6n2RVujKtr7jtNCw4YmeYNpZSQb52ou1bl7IgpKGbBnig==} peerDependencies: '@tanstack/react-query': '>=5.0.0' react: '>=18' @@ -10891,6 +11014,16 @@ packages: snapshots: + '@0no-co/graphql.web@1.0.7(graphql@15.8.0)': + optionalDependencies: + graphql: 15.8.0 + + '@0no-co/graphqlsp@1.12.12(graphql@15.8.0)(typescript@5.5.3)': + dependencies: + '@gql.tada/internal': 1.0.4(graphql@15.8.0)(typescript@5.5.3) + graphql: 15.8.0 + typescript: 5.5.3 + '@aashutoshrathi/word-wrap@1.2.6': {} '@adobe/css-tools@4.4.0': {} @@ -12946,6 +13079,24 @@ snapshots: '@floating-ui/utils@0.2.1': {} + '@gql.tada/cli-utils@1.5.1(@0no-co/graphqlsp@1.12.12(graphql@15.8.0)(typescript@5.5.3))(graphql@15.8.0)(svelte@4.2.18)(typescript@5.5.3)': + dependencies: + '@0no-co/graphqlsp': 1.12.12(graphql@15.8.0)(typescript@5.5.3) + '@gql.tada/internal': 1.0.4(graphql@15.8.0)(typescript@5.5.3) + '@vue/compiler-dom': 3.4.33 + '@vue/language-core': 2.0.28(typescript@5.5.3) + graphql: 15.8.0 + svelte2tsx: 0.7.13(svelte@4.2.18)(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - svelte + + '@gql.tada/internal@1.0.4(graphql@15.8.0)(typescript@5.5.3)': + dependencies: + '@0no-co/graphql.web': 1.0.7(graphql@15.8.0) + graphql: 15.8.0 + typescript: 5.5.3 + '@graphql-codegen/add@5.0.3(graphql@15.8.0)': dependencies: '@graphql-codegen/plugin-helpers': 5.0.4(graphql@15.8.0) @@ -15787,7 +15938,7 @@ snapshots: '@safe-global/safe-apps-sdk@9.1.0(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)': dependencies: '@safe-global/safe-gateway-typescript-sdk': 3.22.0 - viem: 2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) transitivePeerDependencies: - bufferutil - typescript @@ -16460,17 +16611,51 @@ snapshots: transitivePeerDependencies: - supports-color - '@wagmi/connectors@5.0.26(@types/react@18.3.3)(@wagmi/core@2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': + '@volar/language-core@2.4.0-alpha.18': + dependencies: + '@volar/source-map': 2.4.0-alpha.18 + + '@volar/source-map@2.4.0-alpha.18': {} + + '@vue/compiler-core@3.4.33': + dependencies: + '@babel/parser': 7.24.8 + '@vue/shared': 3.4.33 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + + '@vue/compiler-dom@3.4.33': + dependencies: + '@vue/compiler-core': 3.4.33 + '@vue/shared': 3.4.33 + + '@vue/language-core@2.0.28(typescript@5.5.3)': + dependencies: + '@volar/language-core': 2.4.0-alpha.18 + '@vue/compiler-dom': 3.4.33 + '@vue/shared': 3.4.33 + computeds: 0.0.1 + minimatch: 9.0.3 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + vue-template-compiler: 2.7.16 + optionalDependencies: + typescript: 5.5.3 + + '@vue/shared@3.4.33': {} + + '@wagmi/connectors@5.1.0(@types/react@18.3.3)(@wagmi/core@2.13.0(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8)': dependencies: '@coinbase/wallet-sdk': 4.0.4 '@metamask/sdk': 0.26.5(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) - '@wagmi/core': 2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@wagmi/core': 2.13.0(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10) '@walletconnect/modal': 2.6.2(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712) cbw-sdk: '@coinbase/wallet-sdk@3.9.3' - viem: 2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: @@ -16499,11 +16684,25 @@ snapshots: - utf-8-validate - zod - '@wagmi/core@2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))': + '@wagmi/core@2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: eventemitter3: 5.0.1 mipd: 0.0.7(typescript@5.5.3) - viem: 2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + zustand: 4.4.1(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712) + optionalDependencies: + '@tanstack/query-core': 5.51.9 + typescript: 5.5.3 + transitivePeerDependencies: + - '@types/react' + - immer + - react + + '@wagmi/core@2.13.0(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))': + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.7(typescript@5.5.3) + viem: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) zustand: 4.4.1(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712) optionalDependencies: '@tanstack/query-core': 5.51.9 @@ -17127,6 +17326,8 @@ snapshots: dependencies: dequal: 2.0.3 + axobject-query@4.1.0: {} + babel-core@7.0.0-bridge.0(@babel/core@7.24.7): dependencies: '@babel/core': 7.24.7 @@ -17662,6 +17863,14 @@ snapshots: co@4.6.0: {} + code-red@1.0.4: + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + '@types/estree': 1.0.5 + acorn: 8.11.3 + estree-walker: 3.0.3 + periscopic: 3.1.0 + collapse-white-space@2.1.0: {} collect-v8-coverage@1.0.2: {} @@ -17761,6 +17970,8 @@ snapshots: transitivePeerDependencies: - supports-color + computeds@0.0.1: {} + concat-map@0.0.1: {} concat-stream@1.6.2: @@ -17922,6 +18133,11 @@ snapshots: css-system-font-keywords@1.0.0: {} + css-tree@2.3.1: + dependencies: + mdn-data: 2.0.30 + source-map-js: 1.2.0 + css-what@6.1.0: {} css.escape@1.5.1: {} @@ -18047,6 +18263,8 @@ snapshots: dayjs@1.11.11: {} + de-indent@1.0.2: {} + debounce@1.2.1: {} debug@2.6.9: @@ -18080,6 +18298,8 @@ snapshots: decode-uri-component@0.2.2: {} + dedent-js@1.0.1: {} + dedent@1.5.1: {} deep-is@0.1.4: {} @@ -19424,6 +19644,17 @@ snapshots: dependencies: get-intrinsic: 1.2.4 + gql.tada@1.8.2(graphql@15.8.0)(svelte@4.2.18)(typescript@5.5.3): + dependencies: + '@0no-co/graphql.web': 1.0.7(graphql@15.8.0) + '@0no-co/graphqlsp': 1.12.12(graphql@15.8.0)(typescript@5.5.3) + '@gql.tada/cli-utils': 1.5.1(@0no-co/graphqlsp@1.12.12(graphql@15.8.0)(typescript@5.5.3))(graphql@15.8.0)(svelte@4.2.18)(typescript@5.5.3) + '@gql.tada/internal': 1.0.4(graphql@15.8.0)(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - graphql + - svelte + gql@1.1.2: {} graceful-fs@4.2.11: {} @@ -19681,6 +19912,8 @@ snapshots: property-information: 6.4.1 space-separated-tokens: 2.0.2 + he@1.2.0: {} + header-case@2.0.4: dependencies: capital-case: 1.0.4 @@ -20821,6 +21054,8 @@ snapshots: pify: 3.0.0 strip-bom: 3.0.0 + locate-character@3.0.0: {} + locate-path@3.0.0: dependencies: p-locate: 3.0.0 @@ -20907,6 +21142,10 @@ snapshots: dependencies: react: 19.0.0-rc-df5f2736-20240712 + magic-string@0.30.10: + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + make-dir@2.1.0: dependencies: pify: 4.0.1 @@ -21159,6 +21398,8 @@ snapshots: dependencies: '@types/mdast': 4.0.3 + mdn-data@2.0.30: {} + media-query-parser@2.0.2: dependencies: '@babel/runtime': 7.24.7 @@ -21752,6 +21993,8 @@ snapshots: ms@2.1.3: {} + muggle-string@0.4.1: {} + multibase@4.0.6: dependencies: '@multiformats/base-x': 4.0.1 @@ -22191,6 +22434,8 @@ snapshots: no-case: 3.0.4 tslib: 2.6.2 + path-browserify@1.0.1: {} + path-case@3.0.4: dependencies: dot-case: 3.0.4 @@ -22772,7 +23017,7 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - react-resizable-panels@2.0.21(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712): + react-resizable-panels@2.0.22(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react@19.0.0-rc-df5f2736-20240712): dependencies: react: 19.0.0-rc-df5f2736-20240712 react-dom: 19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712) @@ -23718,6 +23963,30 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svelte2tsx@0.7.13(svelte@4.2.18)(typescript@5.5.3): + dependencies: + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 4.2.18 + typescript: 5.5.3 + + svelte@4.2.18: + dependencies: + '@ampproject/remapping': 2.2.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.25 + '@types/estree': 1.0.5 + acorn: 8.11.3 + aria-query: 5.3.0 + axobject-query: 4.1.0 + code-red: 1.0.4 + css-tree: 2.3.1 + estree-walker: 3.0.3 + is-reference: 3.0.2 + locate-character: 3.0.0 + magic-string: 0.30.10 + periscopic: 3.1.0 + svg-arc-to-cubic-bezier@3.2.0: {} svg-path-bounds@1.0.2: @@ -24327,7 +24596,7 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8): + viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 @@ -24461,18 +24730,23 @@ snapshots: '@mapbox/vector-tile': 1.3.1 pbf: 3.2.1 + vue-template-compiler@2.7.16: + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + w3c-xmlserializer@4.0.0: dependencies: xml-name-validator: 4.0.0 - wagmi@2.11.3(@tanstack/query-core@5.51.9)(@tanstack/react-query@5.51.9(react@19.0.0-rc-df5f2736-20240712))(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): + wagmi@2.12.0(@tanstack/query-core@5.51.9)(@tanstack/react-query@5.51.9(react@19.0.0-rc-df5f2736-20240712))(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): dependencies: '@tanstack/react-query': 5.51.9(react@19.0.0-rc-df5f2736-20240712) - '@wagmi/connectors': 5.0.26(@types/react@18.3.3)(@wagmi/core@2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) - '@wagmi/core': 2.12.2(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + '@wagmi/connectors': 5.1.0(@types/react@18.3.3)(@wagmi/core@2.13.0(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)))(bufferutil@4.0.8)(react-dom@19.0.0-rc-df5f2736-20240712(react@19.0.0-rc-df5f2736-20240712))(react-native@0.74.3(@babel/core@7.24.7)(@babel/preset-env@7.24.8(@babel/core@7.24.7))(@types/react@18.3.3)(bufferutil@4.0.8)(react@19.0.0-rc-df5f2736-20240712)(utf-8-validate@5.0.10))(react@19.0.0-rc-df5f2736-20240712)(rollup@4.13.0)(typescript@5.5.3)(utf-8-validate@5.0.10)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + '@wagmi/core': 2.13.0(@tanstack/query-core@5.51.9)(@types/react@18.3.3)(react@19.0.0-rc-df5f2736-20240712)(typescript@5.5.3)(viem@2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8)) react: 19.0.0-rc-df5f2736-20240712 use-sync-external-store: 1.2.0(react@19.0.0-rc-df5f2736-20240712) - viem: 2.17.5(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) + viem: 2.17.10(bufferutil@4.0.8)(typescript@5.5.3)(utf-8-validate@5.0.10)(zod@3.23.8) optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: diff --git a/src/app/[chainId]/[safeAddress]/[orderId]/page.tsx b/src/app/[chainId]/[safeAddress]/[orderId]/page.tsx index ccd8214..55b0864 100644 --- a/src/app/[chainId]/[safeAddress]/[orderId]/page.tsx +++ b/src/app/[chainId]/[safeAddress]/[orderId]/page.tsx @@ -12,6 +12,9 @@ export default function OrderPage({ orderId: string; }; }) { + if (params.chainId != 11155111) { + throw new Error("Invalid chainId"); + } return ( diff --git a/src/components/ConsolidatedOrdersTable/columns.tsx b/src/components/ConsolidatedOrdersTable/columns.tsx index 0352dc5..b9cbdc9 100644 --- a/src/components/ConsolidatedOrdersTable/columns.tsx +++ b/src/components/ConsolidatedOrdersTable/columns.tsx @@ -27,7 +27,7 @@ interface TokenPair { tokenB: Omit; } -const isStopLossOrder = ( +const isPostedOrder = ( order: ConsolidatedOrderType, ): order is StopLossOrderType => { return "stopLossData" in order && order.stopLossData !== null; @@ -38,10 +38,15 @@ const isDraftOrder = (order: ConsolidatedOrderType): order is DraftOrder => { }; export function getOrderDescription(order: ConsolidatedOrderType): string { - if (isStopLossOrder(order) && order.stopLossData) { - const { isSellOrder, tokenAmountIn, tokenIn, tokenAmountOut, tokenOut } = - order.stopLossData; - return `${isSellOrder ? "Sell" : "Buy"} ${formatUnits(tokenAmountIn, tokenIn.decimals)} ${tokenIn.symbol} for ${formatUnits(tokenAmountOut, tokenOut.decimals)} ${tokenOut.symbol}`; + if (isPostedOrder(order) && order.stopLossData) { + const { + isSellOrder, + tokenSellAmount, + tokenSell, + tokenBuyAmount, + tokenBuy, + } = order.stopLossData; + return `${isSellOrder ? "Sell" : "Buy"} ${formatUnits(tokenSellAmount as bigint, tokenSell.decimals)} ${tokenSell.symbol} for ${formatUnits(tokenBuyAmount as bigint, tokenBuy.decimals)} ${tokenBuy.symbol}`; } else if (isDraftOrder(order)) { return `${order.isSellOrder ? "Sell" : "Buy"} ${order.amountSell} ${order.tokenSell.symbol} for ${order.amountBuy} ${order.tokenBuy.symbol}`; } @@ -49,10 +54,10 @@ export function getOrderDescription(order: ConsolidatedOrderType): string { } const getTokenPair = (order: ConsolidatedOrderType): TokenPair | null => { - if (isStopLossOrder(order) && order.stopLossData) { + if (isPostedOrder(order) && order.stopLossData) { return { - tokenA: order.stopLossData.tokenOut, - tokenB: order.stopLossData.tokenIn, + tokenA: order.stopLossData.tokenBuy, + tokenB: order.stopLossData.tokenSell, } as TokenPair; } if (isDraftOrder(order)) { @@ -78,28 +83,24 @@ const usePrice = ( return marketPrice ?? null; } - if ( - priceKey === "limitPrice" && - isStopLossOrder(order) && - order.stopLossData - ) { + if (priceKey === "limitPrice" && isPostedOrder(order) && order.stopLossData) { const amountSell = formatUnits( - order.stopLossData.tokenAmountIn, - order.stopLossData.tokenIn.decimals, + order.stopLossData.tokenSellAmount as bigint, + order.stopLossData.tokenSell.decimals, ); const amountBuy = formatUnits( - order.stopLossData.tokenAmountOut, - order.stopLossData.tokenOut.decimals, + order.stopLossData.tokenBuyAmount as bigint, + order.stopLossData.tokenBuy.decimals, ); return Number(amountBuy) / Number(amountSell); } if ( - isStopLossOrder(order) && + isPostedOrder(order) && order.stopLossData && priceKey === "strikePrice" ) { - return Number(formatUnits(order.stopLossData.strike, 18)); + return Number(formatUnits(order.stopLossData.strike as bigint, 18)); } if (isDraftOrder(order) && priceKey in order) { @@ -264,7 +265,7 @@ export function getColumns(): ColumnDef[] { { id: "details", cell: ({ row }) => { - if (isStopLossOrder(row.original) && "id" in row.original) { + if (isPostedOrder(row.original) && "id" in row.original) { const { safeAddress, chainId } = useSafeApp(); return ( diff --git a/src/components/ConsolidatedOrdersTable/index.tsx b/src/components/ConsolidatedOrdersTable/index.tsx index 5398210..35286e6 100644 --- a/src/components/ConsolidatedOrdersTable/index.tsx +++ b/src/components/ConsolidatedOrdersTable/index.tsx @@ -9,7 +9,7 @@ import { DataTableFilterField, useDataTable } from "#/hooks/useDataTable"; import { useDraftOrders } from "#/hooks/useDraftOrders"; import { useOrderList } from "#/hooks/useOrderList"; import { useTxManager } from "#/hooks/useTxManager"; -import { DraftOrder, StopLossOrderType } from "#/lib/types"; +import { DraftOrder, OrderStatus, StopLossOrderType } from "#/lib/types"; import { DataTableToolbar } from "../data-table/data-table-toolbar"; import { Spinner } from "../ui/spinner"; @@ -27,7 +27,9 @@ export function ConsolidatedOrdersTable() { const allOrders: ConsolidatedOrderType[] = useMemo( () => [ - ...draftOrders.map((order) => ({ ...order, status: "draft" }) as const), + ...draftOrders.map( + (order) => ({ ...order, status: OrderStatus.DRAFT }) as const, + ), ...orders, ], [draftOrders, orders], @@ -44,11 +46,33 @@ export function ConsolidatedOrdersTable() { label: "Status", value: "status", options: [ - { label: "Draft", value: "draft" }, - { label: "Open", value: "open" }, - { label: "Filled", value: "filled" }, - { label: "Partially filled", value: "partiallyFilled" }, - { label: "Cancelled", value: "cancelled" }, + { label: "Draft", value: OrderStatus.DRAFT }, + { + label: "Open", + value: OrderStatus.OPEN || OrderStatus.PARTIALLY_FILLED, + }, + { + label: "Filled", + value: + OrderStatus.FULFILLED || OrderStatus.PARTIALLY_FILLED_AND_EXPIRED, + }, + { + label: "Partially filled", + value: + OrderStatus.PARTIALLY_FILLED || + OrderStatus.PARTIALLY_FILLED_AND_CANCELLED || + OrderStatus.PARTIALLY_FILLED_AND_EXPIRED, + }, + { + label: "Cancelled", + value: + OrderStatus.CANCELLED || OrderStatus.PARTIALLY_FILLED_AND_CANCELLED, + }, + { + label: "Expired", + value: + OrderStatus.EXPIRED || OrderStatus.PARTIALLY_FILLED_AND_EXPIRED, + }, ], }, ]; @@ -58,7 +82,11 @@ export function ConsolidatedOrdersTable() { columns, filterFields, enableRowSelection: (row) => - row.original.status !== "filled" && row.original.status !== "cancelled", + [ + OrderStatus.DRAFT, + OrderStatus.OPEN, + OrderStatus.PARTIALLY_FILLED, + ].includes(row.original.status), }); return ( diff --git a/src/components/ConsolidatedOrdersTable/toolbar-actions.tsx b/src/components/ConsolidatedOrdersTable/toolbar-actions.tsx index f2e4117..d7e6a26 100644 --- a/src/components/ConsolidatedOrdersTable/toolbar-actions.tsx +++ b/src/components/ConsolidatedOrdersTable/toolbar-actions.tsx @@ -16,7 +16,7 @@ import { useDraftOrders } from "#/hooks/useDraftOrders"; import { useTxManager } from "#/hooks/useTxManager"; import { useUIStore } from "#/hooks/useUIState"; import { OrderCancelArgs, TRANSACTION_TYPES } from "#/lib/transactionFactory"; -import { DraftOrder, StopLossOrderType } from "#/lib/types"; +import { DraftOrder, OrderStatus, StopLossOrderType } from "#/lib/types"; import { type ConsolidatedOrderType } from "../ConsolidatedOrdersTable"; import { ReviewOrdersDialog } from "../ReviewOrdersDialog"; @@ -50,10 +50,12 @@ export function ConsolidatedOrdersTableToolbarActions({ .getFilteredSelectedRowModel() .rows.map((row) => row.original); const selectedDraftOrders = selectedOrders.filter( - (order) => order.status === "draft", + (order) => order.status === OrderStatus.DRAFT, ) as DraftOrder[]; const selectedOpenOrders = selectedOrders.filter( - (order) => order.status === "open", + (order) => + order.status === OrderStatus.OPEN || + order.status === OrderStatus.PARTIALLY_FILLED, ) as StopLossOrderType[]; const onCancelOrders = () => { @@ -148,7 +150,13 @@ export function RemoveDraftOrdersDialog({ showTooltip={disabled} tooltipText={DRAFT_ORDER_ACTIONS_DISABLED_TOOLTIP} > - diff --git a/src/components/OrderDetails.tsx b/src/components/OrderDetails.tsx index 60319b6..497e21a 100644 --- a/src/components/OrderDetails.tsx +++ b/src/components/OrderDetails.tsx @@ -3,7 +3,6 @@ import { Button, ClickToCopy, - cn, epochToDate, formatDateTime, formatNumber, @@ -27,11 +26,12 @@ import { Spinner } from "#/components/ui/spinner"; import { InfoTooltip } from "#/components/ui/tooltip"; import { useTxManager } from "#/hooks/useTxManager"; import { COMPOSABLE_COW_ADDRESS } from "#/lib/contracts"; -import { getProcessedStopLossOrder } from "#/lib/orderFetcher"; +import { getProcessedStopLossOrder } from "#/lib/ponderApi/fetchOrders"; import { ChainId } from "#/lib/publicClients"; import { formatTimeDelta } from "#/lib/timeDelta"; import { TOOLTIP_DESCRIPTIONS } from "#/lib/tooltipDescriptions"; import { OrderCancelArgs, TRANSACTION_TYPES } from "#/lib/transactionFactory"; +import { OrderStatus } from "#/lib/types"; import { buildOrderCowExplorerUrl, truncateAddress } from "#/utils"; import { BlockExplorerLink } from "./ExplorerLink"; @@ -49,7 +49,7 @@ export function OrderDetails({ return getProcessedStopLossOrder({ chainId, orderId, - address, + userAddress: address, }); }; const { @@ -76,30 +76,32 @@ export function OrderDetails({ const orderDateTime = formatDateTime( epochToDate(Number(order?.blockTimestamp)), ); - const orderWaitTime = formatTimeDelta( - order?.stopLossData?.validityBucketSeconds as number, + + const orderValidTo = formatDateTime( + epochToDate(Number(order?.stopLossData?.validTo)), ); + const maxOracleUpdateTime = formatTimeDelta( order?.stopLossData?.maxTimeSinceLastOracleUpdate as number, ); const amountIn = - Number(order?.stopLossData?.tokenAmountIn) / - 10 ** Number(order?.stopLossData?.tokenIn.decimals); + Number(order?.stopLossData?.tokenSellAmount) / + 10 ** Number(order?.stopLossData?.tokenSell.decimals); const amountOut = - Number(order?.stopLossData?.tokenAmountOut) / - 10 ** Number(order?.stopLossData?.tokenOut.decimals); + Number(order?.stopLossData?.tokenBuyAmount) / + 10 ** Number(order?.stopLossData?.tokenBuy.decimals); const executedAmountIn = - Number(order?.executedSellAmount) / - 10 ** Number(order?.stopLossData?.tokenIn.decimals); + Number(order?.stopLossData?.executedTokenSellAmount) / + 10 ** Number(order?.stopLossData?.tokenSell.decimals); const executedAmountOut = - Number(order?.executedBuyAmount) / - 10 ** Number(order?.stopLossData?.tokenOut.decimals); - const strikePrice = formatUnits(order?.stopLossData?.strike, 18); + Number(order?.stopLossData?.executedTokenBuyAmount) / + 10 ** Number(order?.stopLossData?.tokenBuy.decimals); + const strikePrice = formatUnits(order?.stopLossData?.strike as bigint, 18); const limitPrice = amountOut / amountIn; const executionPrice = executedAmountOut / executedAmountIn; const orderSurplus = ((executionPrice - limitPrice) / limitPrice) * 100; - const priceUnit = `${order?.stopLossData?.tokenOut.symbol} per ${order?.stopLossData?.tokenIn.symbol}`; + const priceUnit = `${order?.stopLossData?.tokenBuy.symbol} per ${order?.stopLossData?.tokenSell.symbol}`; const onCancelOrder = () => { if (!order) return; @@ -133,7 +135,10 @@ export function OrderDetails({ @@ -194,10 +199,10 @@ export function OrderDetails({ {orderDateTime} - {orderWaitTime} + {orderValidTo} {formatNumber(amountIn, 4)}{" "} - {order?.stopLossData?.tokenIn.symbol} + {order?.stopLossData?.tokenSell.symbol} } - identifier={order?.stopLossData?.tokenIn.address} + identifier={order?.stopLossData?.tokenSell.address} networkId={chainId as ChainId} /> - {order?.stopLossData?.tokenOut.symbol} + {order?.stopLossData?.tokenBuy.symbol} } - identifier={order?.stopLossData?.tokenOut.address} + identifier={order?.stopLossData?.tokenBuy.address} networkId={chainId as ChainId} /> {priceUnit} - {(order?.filledPct || 0) > 0 && ( + {(Number(order?.stopLossData?.filledPctBps) || 0) > 0 && ( <>
Swapped {formatNumber(executedAmountIn, 4)}{" "} - {order?.stopLossData?.tokenIn.symbol} for{" "} + {order?.stopLossData?.tokenSell.symbol} for{" "} {formatNumber(executedAmountOut, 4)}{" "} - {order?.stopLossData?.tokenOut.symbol} + {order?.stopLossData?.tokenBuy.symbol} {orderSurplus > 0 && ( ({formatNumber(orderSurplus, 4)}% surplus) @@ -367,40 +374,29 @@ export function OrderDetails({
- {order?.cowOrders && order.cowOrders.length > 0 && ( - <> - - -
- {order.cowOrders.map((cowOrder) => ( -
- {truncateAddress(cowOrder.uid)} - - - - - - - -
- ))} -
-
- + {order?.cowOrder && ( + +
+ {truncateAddress(order.cowOrder.uid)} + + + + + + +
+
)} diff --git a/src/components/PriceInputCard.tsx b/src/components/PriceInputCard.tsx index 53bcf92..0fbeba8 100644 --- a/src/components/PriceInputCard.tsx +++ b/src/components/PriceInputCard.tsx @@ -96,7 +96,7 @@ function PriceInputCardComponent({
{title} - +
diff --git a/src/components/ReviewOrdersDialog.tsx b/src/components/ReviewOrdersDialog.tsx index 582e842..cd973b1 100644 --- a/src/components/ReviewOrdersDialog.tsx +++ b/src/components/ReviewOrdersDialog.tsx @@ -144,6 +144,7 @@ function OrderContent({ order }: { order: DraftOrder }) { order.tokenBuy, ); const marketPrice = currentMarketPrice || order.fallbackMarketPrice; + const validToDate = new Date(order.validTo * 1000); return (
{order.partiallyFillable ? "Partial fillable" : "Fill or Kill"} + + {validToDate.toLocaleTimeString("en-GB", { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + })} + Open ); - case "filled": + case OrderStatus.FULFILLED: return ( ); - case "partiallyFilled": + case OrderStatus.PARTIALLY_FILLED: + case OrderStatus.PARTIALLY_FILLED_AND_CANCELLED: + case OrderStatus.PARTIALLY_FILLED_AND_EXPIRED: return ( ); - case "cancelled": + case OrderStatus.CANCELLED: + case OrderStatus.EXPIRED: return ( - Cancelled + {status && capitalize(status)} ); default: diff --git a/src/components/swap-card/SwapForm.tsx b/src/components/swap-card/SwapForm.tsx index d9311a2..ee8b89e 100644 --- a/src/components/swap-card/SwapForm.tsx +++ b/src/components/swap-card/SwapForm.tsx @@ -20,6 +20,7 @@ import { ReviewOrdersDialog } from "../ReviewOrdersDialog"; import { TokenInputCard } from "../TokenInputCard"; import { Form } from "../ui/form"; import { SwapCardSubmitButton } from "./SwapCardSubmitButton"; +import { ValidToInput } from "./ValidToInput"; export function SwapForm() { const { chainId, safeAddress } = useSafeApp(); @@ -68,6 +69,7 @@ export function SwapForm() {
+ diff --git a/src/components/swap-card/ValidToInput.tsx b/src/components/swap-card/ValidToInput.tsx new file mode 100644 index 0000000..adfcc7b --- /dev/null +++ b/src/components/swap-card/ValidToInput.tsx @@ -0,0 +1,62 @@ +"use client"; + +import { Card, CardTitle } from "@bleu/ui"; +import { Controller, useFormContext } from "react-hook-form"; + +import { VALID_TO_OPTIONS } from "#/lib/schema"; +import { TOOLTIP_DESCRIPTIONS } from "#/lib/tooltipDescriptions"; +import { SwapData } from "#/lib/types"; + +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectTrigger, + SelectValue, +} from "../ui/select"; +import { InfoTooltip } from "../ui/tooltip"; + +export function ValidToInput() { + const { control } = useFormContext(); + + return ( + + +
+ Expiry + +
+
+ ( + + )} + /> +
+ ); +} diff --git a/src/hooks/useDataTable.ts b/src/hooks/useDataTable.ts index d423986..a2b41e0 100644 --- a/src/hooks/useDataTable.ts +++ b/src/hooks/useDataTable.ts @@ -138,7 +138,7 @@ const schema = z.object({ export function useDataTable({ data, columns, - defaultPerPage = 5, + defaultPerPage = 10, defaultSort, filterFields = [], enableAdvancedFilter = false, diff --git a/src/hooks/useDraftOrder.ts b/src/hooks/useDraftOrder.ts index 37a2378..036278c 100644 --- a/src/hooks/useDraftOrder.ts +++ b/src/hooks/useDraftOrder.ts @@ -3,8 +3,9 @@ import { create } from "zustand"; import { CHAINS_ORACLE_ROUTER_FACTORY } from "#/lib/oracleRouter"; import { ChainId } from "#/lib/publicClients"; +import { VALID_TO_VALUES_MAP } from "#/lib/schema"; import { fetchPairUsdPrice } from "#/lib/tokenUtils"; -import { DraftOrder, SwapData } from "#/lib/types"; +import { DraftOrder, OrderStatus, SwapData } from "#/lib/types"; import { generateRandomHex } from "#/utils"; import { useAdvancedSettingsStore } from "./useAdvancedSettings"; @@ -62,9 +63,12 @@ export const useDraftOrder = create()((set) => ({ chainId: chainId as ChainId, }); - const timestamp = Date.now().toString(16); - const randomPart = generateRandomHex(64 - timestamp.length); - const salt = `0x${timestamp}${randomPart}` as `0x${string}`; + const timestamp = Date.now(); + const timestampHex = timestamp.toString(16); + const randomPart = generateRandomHex(64 - timestampHex.length); + const salt = `0x${timestampHex}${randomPart}` as `0x${string}`; + const validTo = + Math.floor(timestamp / 1000) + VALID_TO_VALUES_MAP[data.validTo]; const draftOrder: DraftOrder = { ...data, @@ -76,7 +80,8 @@ export const useDraftOrder = create()((set) => ({ oraclePrice, fallbackMarketPrice, salt, - status: "draft", + validTo, + status: OrderStatus.DRAFT, }; return draftOrder; diff --git a/src/hooks/useOrderList.ts b/src/hooks/useOrderList.ts index 1f16ec9..44774f9 100644 --- a/src/hooks/useOrderList.ts +++ b/src/hooks/useOrderList.ts @@ -6,7 +6,7 @@ import { create } from "zustand"; import { createJSONStorage, persist } from "zustand/middleware"; import { useTxManager } from "#/hooks/useTxManager"; -import { getProcessedStopLossOrders } from "#/lib/orderFetcher"; +import { getProcessedStopLossOrders } from "#/lib/ponderApi/fetchOrders"; import { ChainId } from "#/lib/publicClients"; import { StopLossOrderType } from "#/lib/types"; @@ -39,7 +39,7 @@ export function useOrderList() { const { error, isValidating, mutate } = useSWR( { chainId: safe.chainId as ChainId, - address: safe.safeAddress as Address, + userAddress: safe.safeAddress as Address, }, getProcessedStopLossOrders, { diff --git a/src/hooks/useTxManager.ts b/src/hooks/useTxManager.ts index 41d15ea..c31dcd2 100644 --- a/src/hooks/useTxManager.ts +++ b/src/hooks/useTxManager.ts @@ -2,7 +2,7 @@ import { TransactionStatus } from "@safe-global/safe-apps-sdk"; import { useMutation } from "@tanstack/react-query"; import { useEffect } from "react"; -import { getBlockNumberFromPrometheusMetrics } from "#/lib/ponderApi"; +import { getBlockNumberFromPrometheusMetrics } from "#/lib/ponderApi/blockNumber"; import { ChainId, publicClientsFromIds } from "#/lib/publicClients"; import { AllTransactionArgs, diff --git a/src/lib/contracts.ts b/src/lib/contracts.ts index 7b6063f..d1968ff 100644 --- a/src/lib/contracts.ts +++ b/src/lib/contracts.ts @@ -13,17 +13,12 @@ export const GPV2_VAULT_RELAYER_ADDRESS = "0xC92E8bdf79f0507f65a392b0ab4667716BFE0110" as const; export const STOP_LOSS_ADDRESS = { - [mainnet.id]: "0x6a8898f43676d8a3e9a5de286195558c3628a6d4", - [gnosis.id]: "0x5951ebf7dc5ddb9fd2fd6d5c7f4bc7b7509b463b", - [sepolia.id]: "0xb560a403f8450164b8b745ecca41d8ced93c50a1", + // TODO: COW-237 + [mainnet.id]: "0x", + [gnosis.id]: "0x", + [sepolia.id]: "0xe6CDbC068654C506424F7747357F51d0e7caB00e", } as const; export const PRICE_FEED_REGISTER_ADDRESS = { [mainnet.id]: "0x47Fb2585D2C56Fe188D0E6ec628a38b74fCeeeDf", } as const; - -export const BALANCER_MINTER_ADDRESS = { - [mainnet.id]: "0x239e55F427D44C3cc793f49bFB507ebe76638a2b", - [gnosis.id]: "0xA8920455934Da4D853faac1f94Fe7bEf72943eF1", - [sepolia.id]: "0x1783Cd84b3d01854A96B4eD5843753C2CcbD574A", -} as const; diff --git a/src/lib/cowApi/fetchCowOrder.ts b/src/lib/cowApi/fetchCowOrder.ts index a7f6fb1..21d92bc 100644 --- a/src/lib/cowApi/fetchCowOrder.ts +++ b/src/lib/cowApi/fetchCowOrder.ts @@ -1,11 +1,13 @@ -import { Address } from "viem"; import { ChainId } from "../publicClients"; import { COW_API_URL_BY_CHAIN_ID } from "./api"; import { fetcher } from "#/utils/fetcher"; import { CowOrder } from "../types"; -export async function getCowOrders(userAddress: Address, chainId: ChainId) { +export async function getCowOrderByUid( + orderUid: `0x${string}`, + chainId: ChainId, +) { const baseUrl = COW_API_URL_BY_CHAIN_ID[chainId]; - const url = `${baseUrl}/api/v1/account/${userAddress}/orders?limit=1000`; - return await fetcher(url); + const url = `${baseUrl}/api/v1/orders/${orderUid}`; + return await fetcher(url); } diff --git a/src/lib/gql/client.ts b/src/lib/gql/client.ts deleted file mode 100644 index fa9bed3..0000000 --- a/src/lib/gql/client.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ChainId } from "#/lib/publicClients"; -import { SUBGRAPHS, Subgraph } from "codegen"; -import { GraphQLClient } from "graphql-request"; -import composableCowSdk from "./composable-cow"; - -const clientFor = (client: Subgraph) => (chainId: ChainId) => { - const endpoint = SUBGRAPHS[client].endpointFor(chainId); - return new GraphQLClient(endpoint); -}; - -export const composableCowApi = { - client: clientFor(Subgraph.ComposableCow), - gql: (chainId: ChainId) => - composableCowSdk[chainId](composableCowApi.client(chainId)), -}; diff --git a/src/lib/gql/composable-cow/__generated__/1.server.ts b/src/lib/gql/composable-cow/__generated__/1.server.ts deleted file mode 100644 index 887aa9d..0000000 --- a/src/lib/gql/composable-cow/__generated__/1.server.ts +++ /dev/null @@ -1,1023 +0,0 @@ -import { GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; diff --git a/src/lib/gql/composable-cow/__generated__/1.ts b/src/lib/gql/composable-cow/__generated__/1.ts deleted file mode 100644 index 967fcce..0000000 --- a/src/lib/gql/composable-cow/__generated__/1.ts +++ /dev/null @@ -1,1069 +0,0 @@ -import { ClientError, GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -import useSWR, { - SWRConfiguration as SWRConfigInterface, - Key as SWRKeyInterface, -} from "swr"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; -export function getSdkWithHooks( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - const sdk = getSdk(client, withWrapper); - const genKey = = Record>( - name: string, - object: V = {} as V, - ): SWRKeyInterface => [ - name, - ...Object.keys(object) - .sort() - .map((key) => object[key]), - ]; - return { - ...sdk, - useUserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey( - "UserStopLossOrders", - variables, - ), - () => sdk.UserStopLossOrders(variables), - config, - ); - }, - useOrderById( - variables: OrderByIdQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey("OrderById", variables), - () => sdk.OrderById(variables), - config, - ); - }, - }; -} -export type SdkWithHooks = ReturnType; diff --git a/src/lib/gql/composable-cow/__generated__/100.server.ts b/src/lib/gql/composable-cow/__generated__/100.server.ts deleted file mode 100644 index 887aa9d..0000000 --- a/src/lib/gql/composable-cow/__generated__/100.server.ts +++ /dev/null @@ -1,1023 +0,0 @@ -import { GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; diff --git a/src/lib/gql/composable-cow/__generated__/100.ts b/src/lib/gql/composable-cow/__generated__/100.ts deleted file mode 100644 index 967fcce..0000000 --- a/src/lib/gql/composable-cow/__generated__/100.ts +++ /dev/null @@ -1,1069 +0,0 @@ -import { ClientError, GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -import useSWR, { - SWRConfiguration as SWRConfigInterface, - Key as SWRKeyInterface, -} from "swr"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; -export function getSdkWithHooks( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - const sdk = getSdk(client, withWrapper); - const genKey = = Record>( - name: string, - object: V = {} as V, - ): SWRKeyInterface => [ - name, - ...Object.keys(object) - .sort() - .map((key) => object[key]), - ]; - return { - ...sdk, - useUserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey( - "UserStopLossOrders", - variables, - ), - () => sdk.UserStopLossOrders(variables), - config, - ); - }, - useOrderById( - variables: OrderByIdQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey("OrderById", variables), - () => sdk.OrderById(variables), - config, - ); - }, - }; -} -export type SdkWithHooks = ReturnType; diff --git a/src/lib/gql/composable-cow/__generated__/11155111.server.ts b/src/lib/gql/composable-cow/__generated__/11155111.server.ts deleted file mode 100644 index 887aa9d..0000000 --- a/src/lib/gql/composable-cow/__generated__/11155111.server.ts +++ /dev/null @@ -1,1023 +0,0 @@ -import { GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; diff --git a/src/lib/gql/composable-cow/__generated__/11155111.ts b/src/lib/gql/composable-cow/__generated__/11155111.ts deleted file mode 100644 index 967fcce..0000000 --- a/src/lib/gql/composable-cow/__generated__/11155111.ts +++ /dev/null @@ -1,1069 +0,0 @@ -import { ClientError, GraphQLClient } from "graphql-request"; -import { GraphQLClientRequestHeaders } from "graphql-request/build/cjs/types"; -import gql from "graphql-tag"; -import useSWR, { - SWRConfiguration as SWRConfigInterface, - Key as SWRKeyInterface, -} from "swr"; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigInt: { input: any; output: any }; -}; - -export type ConstantProductData = { - __typename?: "ConstantProductData"; - appData: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - minTradedToken0: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - priceOracle: Scalars["String"]["output"]; - priceOracleData: Scalars["String"]["output"]; - token0: Token; - token0Id: Scalars["String"]["output"]; - token1: Token; - token1Id: Scalars["String"]["output"]; -}; - -export type ConstantProductDataFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - minTradedToken0?: InputMaybe; - minTradedToken0_gt?: InputMaybe; - minTradedToken0_gte?: InputMaybe; - minTradedToken0_in?: InputMaybe< - Array> - >; - minTradedToken0_lt?: InputMaybe; - minTradedToken0_lte?: InputMaybe; - minTradedToken0_not?: InputMaybe; - minTradedToken0_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - priceOracle?: InputMaybe; - priceOracleData?: InputMaybe; - priceOracleData_gt?: InputMaybe; - priceOracleData_gte?: InputMaybe; - priceOracleData_in?: InputMaybe< - Array> - >; - priceOracleData_lt?: InputMaybe; - priceOracleData_lte?: InputMaybe; - priceOracleData_not?: InputMaybe; - priceOracleData_not_in?: InputMaybe< - Array> - >; - priceOracle_gt?: InputMaybe; - priceOracle_gte?: InputMaybe; - priceOracle_in?: InputMaybe>>; - priceOracle_lt?: InputMaybe; - priceOracle_lte?: InputMaybe; - priceOracle_not?: InputMaybe; - priceOracle_not_in?: InputMaybe< - Array> - >; - token0Id?: InputMaybe; - token0Id_contains?: InputMaybe; - token0Id_ends_with?: InputMaybe; - token0Id_in?: InputMaybe>>; - token0Id_not?: InputMaybe; - token0Id_not_contains?: InputMaybe; - token0Id_not_ends_with?: InputMaybe; - token0Id_not_in?: InputMaybe>>; - token0Id_not_starts_with?: InputMaybe; - token0Id_starts_with?: InputMaybe; - token1Id?: InputMaybe; - token1Id_contains?: InputMaybe; - token1Id_ends_with?: InputMaybe; - token1Id_in?: InputMaybe>>; - token1Id_not?: InputMaybe; - token1Id_not_contains?: InputMaybe; - token1Id_not_ends_with?: InputMaybe; - token1Id_not_in?: InputMaybe>>; - token1Id_not_starts_with?: InputMaybe; - token1Id_starts_with?: InputMaybe; -}; - -export type ConstantProductDataPage = { - __typename?: "ConstantProductDataPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Order = { - __typename?: "Order"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - chainId: Scalars["Int"]["output"]; - constantProductData?: Maybe; - constantProductDataId?: Maybe; - decodedSuccess: Scalars["Boolean"]["output"]; - hash?: Maybe; - id: Scalars["String"]["output"]; - orderHandler?: Maybe; - orderHandlerId?: Maybe; - salt: Scalars["String"]["output"]; - staticInput: Scalars["String"]["output"]; - stopLossData?: Maybe; - stopLossDataId?: Maybe; - txHash: Scalars["String"]["output"]; - user: User; - userId: Scalars["String"]["output"]; -}; - -export type OrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe< - Array> - >; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe< - Array> - >; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - constantProductDataId?: InputMaybe; - constantProductDataId_contains?: InputMaybe; - constantProductDataId_ends_with?: InputMaybe; - constantProductDataId_in?: InputMaybe< - Array> - >; - constantProductDataId_not?: InputMaybe; - constantProductDataId_not_contains?: InputMaybe; - constantProductDataId_not_ends_with?: InputMaybe; - constantProductDataId_not_in?: InputMaybe< - Array> - >; - constantProductDataId_not_starts_with?: InputMaybe< - Scalars["String"]["input"] - >; - constantProductDataId_starts_with?: InputMaybe; - decodedSuccess?: InputMaybe; - decodedSuccess_in?: InputMaybe< - Array> - >; - decodedSuccess_not?: InputMaybe; - decodedSuccess_not_in?: InputMaybe< - Array> - >; - hash?: InputMaybe; - hash_gt?: InputMaybe; - hash_gte?: InputMaybe; - hash_in?: InputMaybe>>; - hash_lt?: InputMaybe; - hash_lte?: InputMaybe; - hash_not?: InputMaybe; - hash_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - orderHandlerId?: InputMaybe; - orderHandlerId_contains?: InputMaybe; - orderHandlerId_ends_with?: InputMaybe; - orderHandlerId_in?: InputMaybe>>; - orderHandlerId_not?: InputMaybe; - orderHandlerId_not_contains?: InputMaybe; - orderHandlerId_not_ends_with?: InputMaybe; - orderHandlerId_not_in?: InputMaybe< - Array> - >; - orderHandlerId_not_starts_with?: InputMaybe; - orderHandlerId_starts_with?: InputMaybe; - salt?: InputMaybe; - salt_gt?: InputMaybe; - salt_gte?: InputMaybe; - salt_in?: InputMaybe>>; - salt_lt?: InputMaybe; - salt_lte?: InputMaybe; - salt_not?: InputMaybe; - salt_not_in?: InputMaybe>>; - staticInput?: InputMaybe; - staticInput_gt?: InputMaybe; - staticInput_gte?: InputMaybe; - staticInput_in?: InputMaybe>>; - staticInput_lt?: InputMaybe; - staticInput_lte?: InputMaybe; - staticInput_not?: InputMaybe; - staticInput_not_in?: InputMaybe< - Array> - >; - stopLossDataId?: InputMaybe; - stopLossDataId_contains?: InputMaybe; - stopLossDataId_ends_with?: InputMaybe; - stopLossDataId_in?: InputMaybe>>; - stopLossDataId_not?: InputMaybe; - stopLossDataId_not_contains?: InputMaybe; - stopLossDataId_not_ends_with?: InputMaybe; - stopLossDataId_not_in?: InputMaybe< - Array> - >; - stopLossDataId_not_starts_with?: InputMaybe; - stopLossDataId_starts_with?: InputMaybe; - txHash?: InputMaybe; - txHash_gt?: InputMaybe; - txHash_gte?: InputMaybe; - txHash_in?: InputMaybe>>; - txHash_lt?: InputMaybe; - txHash_lte?: InputMaybe; - txHash_not?: InputMaybe; - txHash_not_in?: InputMaybe>>; - userId?: InputMaybe; - userId_contains?: InputMaybe; - userId_ends_with?: InputMaybe; - userId_in?: InputMaybe>>; - userId_not?: InputMaybe; - userId_not_contains?: InputMaybe; - userId_not_ends_with?: InputMaybe; - userId_not_in?: InputMaybe>>; - userId_not_starts_with?: InputMaybe; - userId_starts_with?: InputMaybe; -}; - -export type OrderHandler = { - __typename?: "OrderHandler"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - type?: Maybe; -}; - -export type OrderHandlerFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - type?: InputMaybe; - type_contains?: InputMaybe; - type_ends_with?: InputMaybe; - type_in?: InputMaybe>>; - type_not?: InputMaybe; - type_not_contains?: InputMaybe; - type_not_ends_with?: InputMaybe; - type_not_in?: InputMaybe>>; - type_not_starts_with?: InputMaybe; - type_starts_with?: InputMaybe; -}; - -export type OrderHandlerPage = { - __typename?: "OrderHandlerPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type OrderPage = { - __typename?: "OrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type PageInfo = { - __typename?: "PageInfo"; - endCursor?: Maybe; - hasNextPage: Scalars["Boolean"]["output"]; - hasPreviousPage: Scalars["Boolean"]["output"]; - startCursor?: Maybe; -}; - -export type Query = { - __typename?: "Query"; - constantProductData?: Maybe; - constantProductDatas: ConstantProductDataPage; - order?: Maybe; - orderHandler?: Maybe; - orderHandlers: OrderHandlerPage; - orders: OrderPage; - stopLossOrder?: Maybe; - stopLossOrders: StopLossOrderPage; - token?: Maybe; - tokens: TokenPage; - user?: Maybe; - users: UserPage; -}; - -export type QueryConstantProductDataArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryConstantProductDatasArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlerArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryOrderHandlersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryStopLossOrderArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryStopLossOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryTokenArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryTokensArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type QueryUserArgs = { - id: Scalars["String"]["input"]; - timestamp?: InputMaybe; -}; - -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - timestamp?: InputMaybe; - where?: InputMaybe; -}; - -export type StopLossOrder = { - __typename?: "StopLossOrder"; - appData: Scalars["String"]["output"]; - buyTokenPriceOracle: Scalars["String"]["output"]; - id: Scalars["String"]["output"]; - isPartiallyFillable: Scalars["Boolean"]["output"]; - isSellOrder: Scalars["Boolean"]["output"]; - maxTimeSinceLastOracleUpdate: Scalars["BigInt"]["output"]; - orderId: Scalars["String"]["output"]; - sellTokenPriceOracle: Scalars["String"]["output"]; - strike: Scalars["BigInt"]["output"]; - to: Scalars["String"]["output"]; - tokenAmountIn: Scalars["BigInt"]["output"]; - tokenAmountOut: Scalars["BigInt"]["output"]; - tokenIn: Token; - tokenInId: Scalars["String"]["output"]; - tokenOut: Token; - tokenOutId: Scalars["String"]["output"]; - validityBucketSeconds: Scalars["BigInt"]["output"]; -}; - -export type StopLossOrderFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - appData?: InputMaybe; - appData_gt?: InputMaybe; - appData_gte?: InputMaybe; - appData_in?: InputMaybe>>; - appData_lt?: InputMaybe; - appData_lte?: InputMaybe; - appData_not?: InputMaybe; - appData_not_in?: InputMaybe>>; - buyTokenPriceOracle?: InputMaybe; - buyTokenPriceOracle_gt?: InputMaybe; - buyTokenPriceOracle_gte?: InputMaybe; - buyTokenPriceOracle_in?: InputMaybe< - Array> - >; - buyTokenPriceOracle_lt?: InputMaybe; - buyTokenPriceOracle_lte?: InputMaybe; - buyTokenPriceOracle_not?: InputMaybe; - buyTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - isPartiallyFillable?: InputMaybe; - isPartiallyFillable_in?: InputMaybe< - Array> - >; - isPartiallyFillable_not?: InputMaybe; - isPartiallyFillable_not_in?: InputMaybe< - Array> - >; - isSellOrder?: InputMaybe; - isSellOrder_in?: InputMaybe>>; - isSellOrder_not?: InputMaybe; - isSellOrder_not_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate?: InputMaybe; - maxTimeSinceLastOracleUpdate_gt?: InputMaybe; - maxTimeSinceLastOracleUpdate_gte?: InputMaybe; - maxTimeSinceLastOracleUpdate_in?: InputMaybe< - Array> - >; - maxTimeSinceLastOracleUpdate_lt?: InputMaybe; - maxTimeSinceLastOracleUpdate_lte?: InputMaybe; - maxTimeSinceLastOracleUpdate_not?: InputMaybe; - maxTimeSinceLastOracleUpdate_not_in?: InputMaybe< - Array> - >; - orderId?: InputMaybe; - orderId_contains?: InputMaybe; - orderId_ends_with?: InputMaybe; - orderId_in?: InputMaybe>>; - orderId_not?: InputMaybe; - orderId_not_contains?: InputMaybe; - orderId_not_ends_with?: InputMaybe; - orderId_not_in?: InputMaybe>>; - orderId_not_starts_with?: InputMaybe; - orderId_starts_with?: InputMaybe; - sellTokenPriceOracle?: InputMaybe; - sellTokenPriceOracle_gt?: InputMaybe; - sellTokenPriceOracle_gte?: InputMaybe; - sellTokenPriceOracle_in?: InputMaybe< - Array> - >; - sellTokenPriceOracle_lt?: InputMaybe; - sellTokenPriceOracle_lte?: InputMaybe; - sellTokenPriceOracle_not?: InputMaybe; - sellTokenPriceOracle_not_in?: InputMaybe< - Array> - >; - strike?: InputMaybe; - strike_gt?: InputMaybe; - strike_gte?: InputMaybe; - strike_in?: InputMaybe>>; - strike_lt?: InputMaybe; - strike_lte?: InputMaybe; - strike_not?: InputMaybe; - strike_not_in?: InputMaybe>>; - to?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_in?: InputMaybe>>; - tokenAmountIn?: InputMaybe; - tokenAmountIn_gt?: InputMaybe; - tokenAmountIn_gte?: InputMaybe; - tokenAmountIn_in?: InputMaybe>>; - tokenAmountIn_lt?: InputMaybe; - tokenAmountIn_lte?: InputMaybe; - tokenAmountIn_not?: InputMaybe; - tokenAmountIn_not_in?: InputMaybe< - Array> - >; - tokenAmountOut?: InputMaybe; - tokenAmountOut_gt?: InputMaybe; - tokenAmountOut_gte?: InputMaybe; - tokenAmountOut_in?: InputMaybe>>; - tokenAmountOut_lt?: InputMaybe; - tokenAmountOut_lte?: InputMaybe; - tokenAmountOut_not?: InputMaybe; - tokenAmountOut_not_in?: InputMaybe< - Array> - >; - tokenInId?: InputMaybe; - tokenInId_contains?: InputMaybe; - tokenInId_ends_with?: InputMaybe; - tokenInId_in?: InputMaybe>>; - tokenInId_not?: InputMaybe; - tokenInId_not_contains?: InputMaybe; - tokenInId_not_ends_with?: InputMaybe; - tokenInId_not_in?: InputMaybe>>; - tokenInId_not_starts_with?: InputMaybe; - tokenInId_starts_with?: InputMaybe; - tokenOutId?: InputMaybe; - tokenOutId_contains?: InputMaybe; - tokenOutId_ends_with?: InputMaybe; - tokenOutId_in?: InputMaybe>>; - tokenOutId_not?: InputMaybe; - tokenOutId_not_contains?: InputMaybe; - tokenOutId_not_ends_with?: InputMaybe; - tokenOutId_not_in?: InputMaybe>>; - tokenOutId_not_starts_with?: InputMaybe; - tokenOutId_starts_with?: InputMaybe; - validityBucketSeconds?: InputMaybe; - validityBucketSeconds_gt?: InputMaybe; - validityBucketSeconds_gte?: InputMaybe; - validityBucketSeconds_in?: InputMaybe< - Array> - >; - validityBucketSeconds_lt?: InputMaybe; - validityBucketSeconds_lte?: InputMaybe; - validityBucketSeconds_not?: InputMaybe; - validityBucketSeconds_not_in?: InputMaybe< - Array> - >; -}; - -export type StopLossOrderPage = { - __typename?: "StopLossOrderPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type Token = { - __typename?: "Token"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - decimals: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - name: Scalars["String"]["output"]; - symbol: Scalars["String"]["output"]; -}; - -export type TokenFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_in?: InputMaybe>>; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - decimals?: InputMaybe; - decimals_gt?: InputMaybe; - decimals_gte?: InputMaybe; - decimals_in?: InputMaybe>>; - decimals_lt?: InputMaybe; - decimals_lte?: InputMaybe; - decimals_not?: InputMaybe; - decimals_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; - name?: InputMaybe; - name_contains?: InputMaybe; - name_ends_with?: InputMaybe; - name_in?: InputMaybe>>; - name_not?: InputMaybe; - name_not_contains?: InputMaybe; - name_not_ends_with?: InputMaybe; - name_not_in?: InputMaybe>>; - name_not_starts_with?: InputMaybe; - name_starts_with?: InputMaybe; - symbol?: InputMaybe; - symbol_contains?: InputMaybe; - symbol_ends_with?: InputMaybe; - symbol_in?: InputMaybe>>; - symbol_not?: InputMaybe; - symbol_not_contains?: InputMaybe; - symbol_not_ends_with?: InputMaybe; - symbol_not_in?: InputMaybe>>; - symbol_not_starts_with?: InputMaybe; - symbol_starts_with?: InputMaybe; -}; - -export type TokenPage = { - __typename?: "TokenPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type User = { - __typename?: "User"; - address: Scalars["String"]["output"]; - chainId: Scalars["Int"]["output"]; - id: Scalars["String"]["output"]; - orders?: Maybe; -}; - -export type UserOrdersArgs = { - after?: InputMaybe; - before?: InputMaybe; - limit?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; -}; - -export type UserFilter = { - AND?: InputMaybe>>; - OR?: InputMaybe>>; - address?: InputMaybe; - address_contains?: InputMaybe; - address_ends_with?: InputMaybe; - address_in?: InputMaybe>>; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_in?: InputMaybe>>; - address_not_starts_with?: InputMaybe; - address_starts_with?: InputMaybe; - chainId?: InputMaybe; - chainId_gt?: InputMaybe; - chainId_gte?: InputMaybe; - chainId_in?: InputMaybe>>; - chainId_lt?: InputMaybe; - chainId_lte?: InputMaybe; - chainId_not?: InputMaybe; - chainId_not_in?: InputMaybe>>; - id?: InputMaybe; - id_contains?: InputMaybe; - id_ends_with?: InputMaybe; - id_in?: InputMaybe>>; - id_not?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_in?: InputMaybe>>; - id_not_starts_with?: InputMaybe; - id_starts_with?: InputMaybe; -}; - -export type UserPage = { - __typename?: "UserPage"; - items: Array; - pageInfo: PageInfo; -}; - -export type UserStopLossOrdersQueryVariables = Exact<{ - user: Scalars["String"]["input"]; -}>; - -export type UserStopLossOrdersQuery = { - __typename?: "Query"; - orders: { - __typename?: "OrderPage"; - items: Array<{ - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - }>; - }; -}; - -export type OrderByIdQueryVariables = Exact<{ - orderId: Scalars["String"]["input"]; -}>; - -export type OrderByIdQuery = { - __typename?: "Query"; - order?: { - __typename?: "Order"; - blockNumber: any; - blockTimestamp: any; - chainId: number; - decodedSuccess: boolean; - id: string; - txHash: string; - hash?: string | null; - staticInput: string; - stopLossData?: { - __typename?: "StopLossOrder"; - appData: string; - buyTokenPriceOracle: string; - id: string; - isPartiallyFillable: boolean; - isSellOrder: boolean; - maxTimeSinceLastOracleUpdate: any; - orderId: string; - sellTokenPriceOracle: string; - strike: any; - to: string; - tokenAmountIn: any; - tokenAmountOut: any; - validityBucketSeconds: any; - tokenIn: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - tokenOut: { - __typename?: "Token"; - address: string; - decimals: number; - name: string; - symbol: string; - }; - } | null; - } | null; -}; - -export const UserStopLossOrdersDocument = gql` - query UserStopLossOrders($user: String!) { - orders( - where: { stopLossDataId_not: null, userId_in: [$user] } - orderBy: "blockTimestamp" - orderDirection: "desc" - ) { - items { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } - } -`; -export const OrderByIdDocument = gql` - query OrderById($orderId: String!) { - order(id: $orderId) { - blockNumber - blockTimestamp - chainId - decodedSuccess - id - txHash - hash - staticInput - stopLossData { - appData - buyTokenPriceOracle - id - isPartiallyFillable - isSellOrder - maxTimeSinceLastOracleUpdate - orderId - sellTokenPriceOracle - strike - to - tokenAmountIn - tokenAmountOut - tokenIn { - address - decimals - name - symbol - } - tokenOut { - address - decimals - name - symbol - } - validityBucketSeconds - } - } - } -`; - -export type SdkFunctionWrapper = ( - action: (requestHeaders?: Record) => Promise, - operationName: string, - operationType?: string, - variables?: any, -) => Promise; - -const defaultWrapper: SdkFunctionWrapper = ( - action, - _operationName, - _operationType, - variables, -) => action(); - -export function getSdk( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - return { - UserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request( - UserStopLossOrdersDocument, - variables, - { ...requestHeaders, ...wrappedRequestHeaders }, - ), - "UserStopLossOrders", - "query", - variables, - ); - }, - OrderById( - variables: OrderByIdQueryVariables, - requestHeaders?: GraphQLClientRequestHeaders, - ): Promise { - return withWrapper( - (wrappedRequestHeaders) => - client.request(OrderByIdDocument, variables, { - ...requestHeaders, - ...wrappedRequestHeaders, - }), - "OrderById", - "query", - variables, - ); - }, - }; -} -export type Sdk = ReturnType; -export function getSdkWithHooks( - client: GraphQLClient, - withWrapper: SdkFunctionWrapper = defaultWrapper, -) { - const sdk = getSdk(client, withWrapper); - const genKey = = Record>( - name: string, - object: V = {} as V, - ): SWRKeyInterface => [ - name, - ...Object.keys(object) - .sort() - .map((key) => object[key]), - ]; - return { - ...sdk, - useUserStopLossOrders( - variables: UserStopLossOrdersQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey( - "UserStopLossOrders", - variables, - ), - () => sdk.UserStopLossOrders(variables), - config, - ); - }, - useOrderById( - variables: OrderByIdQueryVariables, - config?: SWRConfigInterface, - ) { - return useSWR( - genKey("OrderById", variables), - () => sdk.OrderById(variables), - config, - ); - }, - }; -} -export type SdkWithHooks = ReturnType; diff --git a/src/lib/gql/composable-cow/index.server.ts b/src/lib/gql/composable-cow/index.server.ts deleted file mode 100644 index 53b04e7..0000000 --- a/src/lib/gql/composable-cow/index.server.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { gnosis, mainnet, sepolia } from "viem/chains"; -import { getSdk as ethereumSdk } from "./__generated__/1.server"; -import { getSdk as gnosisSdk } from "./__generated__/100.server"; -import { getSdk as sepoliaSdk } from "./__generated__/11155111.server"; - -export default { - [mainnet.id]: ethereumSdk, - [gnosis.id]: gnosisSdk, - [sepolia.id]: sepoliaSdk, -}; diff --git a/src/lib/gql/composable-cow/index.ts b/src/lib/gql/composable-cow/index.ts deleted file mode 100644 index 094b164..0000000 --- a/src/lib/gql/composable-cow/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { gnosis, mainnet, sepolia } from "viem/chains"; -import { getSdkWithHooks as ethereumSdk } from "./__generated__/1"; -import { getSdkWithHooks as gnosisSdk } from "./__generated__/100"; -import { getSdkWithHooks as sepoliaSdk } from "./__generated__/11155111"; - -export default { - [mainnet.id]: ethereumSdk, - [gnosis.id]: gnosisSdk, - [sepolia.id]: sepoliaSdk, -}; diff --git a/src/lib/gql/server.ts b/src/lib/gql/server.ts deleted file mode 100644 index c22a653..0000000 --- a/src/lib/gql/server.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ChainId } from "#/lib/publicClients"; -import { SUBGRAPHS, Subgraph } from "codegen"; -import { GraphQLClient } from "graphql-request"; -import composableCowSdk from "./composable-cow/index.server"; - -const clientFor = (client: Subgraph) => (chainId: ChainId) => { - const endpoint = SUBGRAPHS[client].endpointFor(chainId); - return new GraphQLClient(endpoint); -}; - -export const orders = { - client: clientFor(Subgraph.ComposableCow), - gql: (chainId: ChainId) => composableCowSdk[chainId](orders.client(chainId)), -}; diff --git a/src/lib/orderFetcher.ts b/src/lib/orderFetcher.ts deleted file mode 100644 index 38959eb..0000000 --- a/src/lib/orderFetcher.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Address } from "viem"; -import { getCowOrders } from "./cowApi/fetchCowOrder"; -import { ChainId, publicClientsFromIds } from "./publicClients"; -import { composableCowApi } from "./gql/client"; -import { COMPOSABLE_COW_ADDRESS } from "./contracts"; -import { composableCowAbi } from "./abis/composableCow"; -import { - CowOrder, - OrderStatus, - StopLossOrderType, - StopLossOrderTypeWithCowOrders, -} from "./types"; - -export async function getProcessedStopLossOrder({ - orderId, - chainId, - address, -}: { - orderId: string; - chainId: ChainId; - address: Address; -}): Promise { - const publicClient = publicClientsFromIds[chainId]; - const rawOrderData = await composableCowApi.gql(chainId).OrderById({ - orderId: orderId, - }); - if (!rawOrderData?.order?.stopLossData || !rawOrderData?.order?.hash) return; - const cowOrders = - (await getRelatedCowOrders({ - address, - chainId, - appData: rawOrderData.order.stopLossData.appData, - })) || []; - const singleOrderResult = await publicClient.readContract({ - address: COMPOSABLE_COW_ADDRESS, - abi: composableCowAbi, - functionName: "singleOrders", - args: [address, rawOrderData?.order?.hash as `0x${string}`], - }); - - const executedSellAmount = cowOrders?.reduce( - (acc, cowOrder) => acc + Number(cowOrder.executedSellAmount), - 0, - ); - - const executedBuyAmount = cowOrders?.reduce( - (acc, cowOrder) => acc + Number(cowOrder.executedBuyAmount), - 0, - ); - - const filledPct = rawOrderData?.order?.stopLossData?.isSellOrder - ? executedSellAmount / - Number(rawOrderData?.order?.stopLossData?.tokenAmountIn) - : executedBuyAmount / - Number(rawOrderData?.order?.stopLossData?.tokenAmountOut); - - const orderWithoutStatus = { - ...rawOrderData.order, - executedBuyAmount: String(executedBuyAmount), - executedSellAmount: String(executedSellAmount), - singleOrder: singleOrderResult, - filledPct, - }; - const status = getOrderStatus({ - order: orderWithoutStatus, - }); - return { - ...orderWithoutStatus, - status, - cowOrders: cowOrders, - }; -} - -export async function getProcessedStopLossOrders({ - chainId, - address, -}: { - chainId: ChainId; - address: Address; -}): Promise { - const publicClient = publicClientsFromIds[chainId]; - const rawOrdersData = await composableCowApi.gql(chainId).UserStopLossOrders({ - user: `${address}-${chainId}`, - }); - const cowOrders = await getCowOrders(address, chainId); - - if (!rawOrdersData?.orders?.items) { - return []; - } - - const multicallResults = await publicClient.multicall({ - contracts: rawOrdersData.orders.items.map((order) => ({ - address: COMPOSABLE_COW_ADDRESS, - abi: composableCowAbi, - functionName: "singleOrders", - args: [address, order.hash], - })), - }); - - const ordersWithStatus = rawOrdersData.orders.items.map((order, index) => { - const cowOrdersMatch = cowOrders.filter( - (cowOrder) => cowOrder.appData === order.stopLossData?.appData, - ); - const singleOrderResult = multicallResults[index]?.result; - - const executedSellAmount = cowOrdersMatch?.reduce( - (acc, cowOrder) => acc + Number(cowOrder.executedSellAmount), - 0, - ); - - const executedBuyAmount = cowOrdersMatch?.reduce( - (acc, cowOrder) => acc + Number(cowOrder.executedBuyAmount), - 0, - ); - - const filledPct = order.stopLossData?.isSellOrder - ? executedSellAmount / Number(order.stopLossData?.tokenAmountIn) - : executedBuyAmount / Number(order.stopLossData?.tokenAmountOut); - - const orderWithoutStatus = { - ...order, - executedBuyAmount: String(executedBuyAmount), - executedSellAmount: String(executedSellAmount), - singleOrder: singleOrderResult, - filledPct, - }; - - const status = getOrderStatus({ - order: orderWithoutStatus, - }); - - return { - ...orderWithoutStatus, - status, - }; - }); - return ordersWithStatus; -} - -export async function getRelatedCowOrders({ - appData, - address, - chainId, -}: { - appData: string; - address: Address; - chainId: ChainId; -}): Promise { - const cowOrders = await getCowOrders(address, chainId); - return cowOrders.filter((order) => order.appData === appData); -} - -export function getOrderStatus({ - order, -}: { - order: Omit; -}): OrderStatus { - if (!order.filledPct && !order.singleOrder) return "cancelled"; - - if (!order.filledPct) return "open"; - - if (order.filledPct >= 1) return "filled"; - - return "partiallyFilled"; -} diff --git a/src/lib/ponderApi.ts b/src/lib/ponderApi/blockNumber.ts similarity index 81% rename from src/lib/ponderApi.ts rename to src/lib/ponderApi/blockNumber.ts index 2de0b3f..d774d58 100644 --- a/src/lib/ponderApi.ts +++ b/src/lib/ponderApi/blockNumber.ts @@ -2,11 +2,12 @@ import parsePrometeusText from "parse-prometheus-text-format"; import { networkFor } from "#/utils"; - -const METRICS_URL = "https://composable-cow-api.up.railway.app/metrics"; +import { NEXT_PUBLIC_API_URL } from "."; export async function getBlockNumberFromPrometheusMetrics(chainId: number) { - const rawMetricsData = await fetch(METRICS_URL).then((res) => res.text()); + const rawMetricsData = await fetch(NEXT_PUBLIC_API_URL + "/metrics").then( + (res) => res.text(), + ); // eslint-disable-next-line @typescript-eslint/no-explicit-any const metrics = parsePrometeusText(rawMetricsData) as Record; diff --git a/src/lib/ponderApi/fetchOrders.ts b/src/lib/ponderApi/fetchOrders.ts new file mode 100644 index 0000000..09b2253 --- /dev/null +++ b/src/lib/ponderApi/fetchOrders.ts @@ -0,0 +1,102 @@ +import request from "graphql-request"; +import { NEXT_PUBLIC_API_URL } from "."; +import { ORDER_QUERY, USER_ORDERS_QUERY } from "./queries"; +import { IStopLossPonder, OrderStatus, StopLossOrderType } from "../types"; +import { ChainId, publicClientsFromIds } from "../publicClients"; +import { composableCowAbi } from "../abis/composableCow"; +import { COMPOSABLE_COW_ADDRESS } from "../contracts"; +import { getCowOrderByUid } from "../cowApi/fetchCowOrder"; + +export const getProcessedStopLossOrder = async ({ + orderId, + userAddress, + chainId, +}: { + orderId: string; + userAddress: string; + chainId: ChainId; +}): Promise => { + const { order } = await request(NEXT_PUBLIC_API_URL, ORDER_QUERY, { + orderId, + }); + + if (!order) { + throw new Error("Order not found"); + } + + const [orderCanceled, relatedCoWOrder] = await Promise.all([ + fetchOrdersCancellations([order?.hash || ""], chainId, userAddress), + getCowOrderByUid( + order?.stopLossData?.orderUid as `0x${string}`, + chainId, + ).catch(() => undefined), + ]); + + return { + ...order, + status: getOrderStatus(order, orderCanceled[0]), + cowOrder: relatedCoWOrder, + canceled: orderCanceled[0], + }; +}; + +export const getProcessedStopLossOrders = async ({ + userAddress, + chainId, +}: { + userAddress: string; + chainId: ChainId; +}): Promise => { + const { orders } = await request(NEXT_PUBLIC_API_URL, USER_ORDERS_QUERY, { + userId: `${userAddress}-${chainId}`, + }); + + const ordersCancellations = await fetchOrdersCancellations( + orders.items.map((order) => order.hash) as string[], + chainId, + userAddress, + ); + + return orders.items.map((order, index) => { + const orderCanceled = ordersCancellations[index]; + const status = getOrderStatus(order, orderCanceled); + return { ...order, status, canceled: orderCanceled }; + }); +}; + +export const fetchOrdersCancellations = async ( + orderHashs: string[], + chainId: ChainId, + ownerAddress: string, +): Promise => { + const publicClient = publicClientsFromIds[chainId]; + const multicallResults = await publicClient.multicall({ + contracts: orderHashs.map((orderHash) => ({ + address: COMPOSABLE_COW_ADDRESS, + abi: composableCowAbi, + functionName: "singleOrders", + args: [ownerAddress, orderHash], + })), + }); + return multicallResults.map((result) => !result?.result); +}; + +const getOrderStatus = ( + order: IStopLossPonder, + orderCanceled: boolean, +): OrderStatus => { + if (!order?.stopLossData) return OrderStatus.OPEN; + + const filledPctBps = BigInt(order.stopLossData.filledPctBps as bigint); + const isValid = Number(order.stopLossData.validTo) * 1000 > Date.now(); + + if (filledPctBps >= BigInt(1_000_000)) return OrderStatus.FULFILLED; + if (filledPctBps > BigInt(0)) { + if (orderCanceled) return OrderStatus.PARTIALLY_FILLED_AND_CANCELLED; + if (!isValid) return OrderStatus.PARTIALLY_FILLED_AND_EXPIRED; + return OrderStatus.PARTIALLY_FILLED; + } + if (orderCanceled) return OrderStatus.CANCELLED; + if (!isValid) return OrderStatus.EXPIRED; + return OrderStatus.OPEN; +}; diff --git a/src/lib/ponderApi/index.ts b/src/lib/ponderApi/index.ts new file mode 100644 index 0000000..249cadf --- /dev/null +++ b/src/lib/ponderApi/index.ts @@ -0,0 +1,3 @@ +export const NEXT_PUBLIC_API_URL = + process.env.NEXT_PUBLIC_API_URL || + "https://composable-cow-api-staging.up.railway.app"; diff --git a/src/lib/gql/composable-cow/orders.ts b/src/lib/ponderApi/queries.ts similarity index 57% rename from src/lib/gql/composable-cow/orders.ts rename to src/lib/ponderApi/queries.ts index 430c962..bc24725 100644 --- a/src/lib/gql/composable-cow/orders.ts +++ b/src/lib/ponderApi/queries.ts @@ -1,8 +1,12 @@ -import { gql } from "graphql-tag"; +import { graphql } from "gql.tada"; -gql( - `query UserStopLossOrders($user: String!) { - orders(where: {stopLossDataId_not: null, userId_in:[$user]} orderBy: "blockTimestamp" orderDirection: "desc") { +export const USER_ORDERS_QUERY = graphql(` + query UserStopLossOrders($userId: String!) { + orders( + where: { stopLossDataId_not: null, userId_in: [$userId] } + orderBy: "blockTimestamp" + orderDirection: "desc" + ) { items { blockNumber blockTimestamp @@ -13,9 +17,10 @@ gql( hash staticInput stopLossData { + id appData + orderUid buyTokenPriceOracle - id isPartiallyFillable isSellOrder maxTimeSinceLastOracleUpdate @@ -23,30 +28,33 @@ gql( sellTokenPriceOracle strike to - tokenAmountIn - tokenAmountOut - tokenIn { + tokenBuyAmount + executedTokenBuyAmount + tokenSellAmount + executedTokenSellAmount + validTo + orderUid + filledPctBps + tokenSell { address decimals name symbol } - tokenOut { + tokenBuy { address decimals name symbol } - validityBucketSeconds } } } - } - `, -); + } +`); -gql( - `query OrderById($orderId: String!) { +export const ORDER_QUERY = graphql(` + query OrderById($orderId: String!) { order(id: $orderId) { blockNumber blockTimestamp @@ -56,10 +64,11 @@ gql( txHash hash staticInput - stopLossData {li + stopLossData { + id appData + orderUid buyTokenPriceOracle - id isPartiallyFillable isSellOrder maxTimeSinceLastOracleUpdate @@ -67,23 +76,26 @@ gql( sellTokenPriceOracle strike to - tokenAmountIn - tokenAmountOut - tokenIn { + tokenBuyAmount + executedTokenBuyAmount + tokenSellAmount + executedTokenSellAmount + filledPctBps + validTo + orderUid + tokenSell { address decimals name symbol } - tokenOut { + tokenBuy { address decimals name symbol } - validityBucketSeconds } } - } - `, -); + } +`); diff --git a/src/lib/publicClients.ts b/src/lib/publicClients.ts index 1458334..84397ff 100644 --- a/src/lib/publicClients.ts +++ b/src/lib/publicClients.ts @@ -7,9 +7,9 @@ export type ChainName = "gnosis" | "mainnet" | "sepolia"; export type ChainId = (typeof supportedChainIds)[number]; -export const supportedChains = [gnosis, mainnet, sepolia] as const; +export const supportedChains = [gnosis, mainnet, sepolia] as const; // TODO: COW-237 -export const supportedChainIds = [mainnet.id, gnosis.id, sepolia.id] as const; +export const supportedChainIds = [mainnet.id, gnosis.id, sepolia.id] as const; // TODO: COW-237 export const RPC_PROVIDERS = { [mainnet.id]: process.env.NEXT_PUBLIC_RPC_URL_MAINNET, diff --git a/src/lib/schema.ts b/src/lib/schema.ts index a31276e..08f9af4 100644 --- a/src/lib/schema.ts +++ b/src/lib/schema.ts @@ -15,6 +15,25 @@ const basicTokenSchema = z.object({ symbol: z.string(), }); +export enum VALID_TO_OPTIONS { + MINUTES_30 = "30 minutes", + HOUR = "1 hour", + DAY = "1 day", + DAYS_3 = "3 days", + DAYS_7 = "7 days", + MONTH_1 = "1 month", + MONTHS_6 = "6 months (max)", +} +export enum VALID_TO_VALUES_MAP { + "30 minutes" = 30 * 60, + "1 hour" = 60 * 60, + "1 day" = 24 * 60 * 60, + "3 days" = 3 * 24 * 60 * 60, + "7 days" = 7 * 24 * 60 * 60, + "1 month" = 30 * 24 * 60 * 60, + "6 months (max)" = 6 * 30 * 24 * 60 * 60, +} + const generateEnsSchema = (chainId: number) => { if (chainId === 1) { return z @@ -64,6 +83,7 @@ export const swapSchema = z strikePrice: z.coerce.number().positive(), limitPrice: z.coerce.number().positive(), isSellOrder: z.coerce.boolean(), + validTo: z.nativeEnum(VALID_TO_OPTIONS), }) .refine( (data) => { @@ -75,8 +95,8 @@ export const swapSchema = z }, ); -export const generateAdvancedSettingsSchema = (chainId: ChainId) => - z +export const generateAdvancedSettingsSchema = (chainId: ChainId) => { + return z .object({ maxHoursSinceOracleUpdates: z.coerce .number() @@ -121,3 +141,4 @@ export const generateAdvancedSettingsSchema = (chainId: ChainId) => path: ["tokenBuyOracle"], }, ); +}; diff --git a/src/lib/staticInputEncoder.ts b/src/lib/staticInputEncoder.ts index 9c5574d..fd715c1 100644 --- a/src/lib/staticInputEncoder.ts +++ b/src/lib/staticInputEncoder.ts @@ -38,7 +38,7 @@ export const stopLossDataStructure = [ type: "bool", }, { - name: "validityBucketSeconds", + name: "validTo", type: "uint32", }, { @@ -91,8 +91,6 @@ export async function stopLossArgsEncoder( data.tokenBuy.decimals, ); - const validityBucketSeconds = 24 * 3600; - return encodeAbiParameters(stopLossDataStructure, [ data.tokenSell.address, data.tokenBuy.address, @@ -102,7 +100,7 @@ export async function stopLossArgsEncoder( data.receiver, data.isSellOrder, data.partiallyFillable, - validityBucketSeconds.toFixed(), + Math.floor(data.validTo), data.tokenSellOracle, data.tokenBuyOracle, strikePriceWithDecimals, diff --git a/src/lib/tooltipDescriptions.ts b/src/lib/tooltipDescriptions.ts index 6a5a713..9b13ac8 100644 --- a/src/lib/tooltipDescriptions.ts +++ b/src/lib/tooltipDescriptions.ts @@ -14,7 +14,9 @@ export enum TOOLTIP_DESCRIPTIONS { ORDER = "The amount sold/bought. Also surplus for this order. This is the positive difference between the initial limit price and the actual (average) execution price.", ORACLE_TOKEN_SELL = "The oracle that will provide the price of the token being sold to the smart-contract. Both oracles must have the same quote currency.", ORACLE_TOKEN_BUY = "The oracle that will provide the price of the token being sold to the smart-contract. Both oracles must have the same quote currency.", - RELATED_ORDERS = "The orders created based on your initial request", + RELATED_ORDER = "The order posted on the CoW Orderbook that is related to this Stop Loss order.", MAX_TIME_SINCE_LAST_ORACLE_UPDATE = "The maximum time since the last oracle update. If the oracle has not been updated in this time, the order will not be executed.", TYPE = "The order can be fill or kill (entire order must be filled) or partial fill (part of the order can be filled respecting the limit price).", + VALID_TO = "The date and time at which the order will expire if not filled.", + VALID_TO_INPUT = "THow long the order will be valid and can be filled starting now. After this, the order will expire.", } diff --git a/src/lib/transactionFactory.ts b/src/lib/transactionFactory.ts index 7c29a74..48a4f67 100644 --- a/src/lib/transactionFactory.ts +++ b/src/lib/transactionFactory.ts @@ -243,7 +243,6 @@ export async function createRawTxArgs({ }; }) as ERC20ApproveArgs[]; - console.log(approveTxs); const ordersTxs = data.map((order) => ({ type: TRANSACTION_TYPES.STOP_LOSS_ORDER, ...order, diff --git a/src/lib/types.ts b/src/lib/types.ts index 72dc769..94ac349 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1,8 +1,8 @@ import { Address } from "viem"; import { generateAdvancedSettingsSchema, swapSchema } from "./schema"; import { z } from "zod"; -import { UserStopLossOrdersQuery } from "./gql/composable-cow/__generated__/1"; -import { ArrElement, GetDeepProp } from "@bleu/ui"; +import { ORDER_QUERY } from "./ponderApi/queries"; +import { ResultOf } from "gql.tada"; export interface IToken { symbol: string; @@ -10,8 +10,16 @@ export interface IToken { address: Address; } -export type OrderStatus = "open" | "cancelled" | "filled" | "partiallyFilled"; - +export enum OrderStatus { + DRAFT = "draft", + OPEN = "open", + FULFILLED = "fulfilled", + CANCELLED = "cancelled", + EXPIRED = "expired", + PARTIALLY_FILLED = "partiallyFilled", + PARTIALLY_FILLED_AND_CANCELLED = "partiallyFilledAndCancelled", + PARTIALLY_FILLED_AND_EXPIRED = "partiallyFilledAndExpired", +} export interface ITokenWithValue extends IToken { balance: string; usdPrice: number; @@ -21,35 +29,18 @@ export interface ITokenWithValue extends IToken { export type AdvancedSwapSettings = z.input< ReturnType >; -export type SwapData = z.input; +export type SwapData = z.output; -export type DraftOrder = SwapData & +export type DraftOrder = Omit & AdvancedSwapSettings & { id: string; - status: "draft"; + status: OrderStatus.DRAFT; oraclePrice: number; fallbackMarketPrice?: number; salt: `0x${string}`; blockTimestamp?: null; + validTo: number; }; - -type StopLossOrderTypeRaw = ArrElement< - GetDeepProp ->; - -export interface StopLossOrderType extends StopLossOrderTypeRaw { - status: OrderStatus; - executedBuyAmount?: string; - executedSellAmount?: string; - executedSurplusFee?: string; - filledPct?: number; - singleOrder?: Address | boolean | undefined; -} - -export interface StopLossOrderTypeWithCowOrders extends StopLossOrderType { - cowOrders: CowOrder[]; -} - export interface CowOrder { appData: string; availableBalance: string; @@ -87,3 +78,10 @@ export interface CowOrder { uid: string; validTo: number; } +export type IStopLossPonder = ResultOf["order"]; + +export type StopLossOrderType = IStopLossPonder & { + status: OrderStatus; + canceled: boolean; + cowOrder?: CowOrder; +}; diff --git a/tsconfig.json b/tsconfig.json index 6cec834..7ba9874 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,11 @@ "jsx": "preserve", "incremental": true, "plugins": [ + { + "name": "gql.tada/ts-plugin", + "schema": "https://composable-cow-api-staging.up.railway.app/", + "tadaOutputLocation": "graphql-env.d.ts" + }, { "name": "next" }