### Web3API Header START ### scalar UInt scalar UInt8 scalar UInt16 scalar UInt32 scalar UInt64 scalar Int scalar Int8 scalar Int16 scalar Int32 scalar Int64 scalar Bytes scalar BigInt directive @imported( uri: String! namespace: String! nativeType: String! ) on OBJECT | ENUM directive @imports( types: [String!]! ) on OBJECT ### Web3API Header END ### type Query @imports( types: [ "Ethereum_Query", "Ethereum_Connection", "Ethereum_TxOverrides", "Ethereum_StaticTxResult", "Ethereum_TxRequest", "Ethereum_TxReceipt", "Ethereum_Log", "Ethereum_EventNotification", "SHA3_Query", "Logger_Query", "Logger_LogLevel" ] ) { currencyEquals( currency: Currency! other: Currency! ): Boolean! tokenEquals( token: Token! other: Token! ): Boolean! tokenAmountEquals( tokenAmount0: TokenAmount! tokenAmount1: TokenAmount! ): Boolean! tokenSortsBefore( token: Token! other: Token! ): Boolean! pairAddress( token0: Token! token1: Token! ): String! pairLiquidityToken( pair: Pair! ): Token! pairReserves( pair: Pair! ): [TokenAmount!]! pairToken0Price( pair: Pair! ): String! pairToken1Price( pair: Pair! ): String! pairOutputAmount( pair: Pair! inputAmount: TokenAmount! ): TokenAmount! pairOutputNextPair( pair: Pair! inputAmount: TokenAmount! ): Pair! pairInputAmount( pair: Pair! outputAmount: TokenAmount! ): TokenAmount! pairInputNextPair( pair: Pair! outputAmount: TokenAmount! ): Pair! pairLiquidityMinted( pair: Pair! totalSupply: TokenAmount! tokenAmount0: TokenAmount! tokenAmount1: TokenAmount! ): TokenAmount pairLiquidityValue( pair: Pair! totalSupply: TokenAmount! liquidity: TokenAmount! feeOn: Boolean kLast: BigInt ): [TokenAmount!]! createRoute( pairs: [Pair!]! input: Token! output: Token ): Route! routePath( pairs: [Pair!]! input: Token! ): [Token!]! routeMidPrice( route: Route! ): String! swapCallParameters( trade: Trade! tradeOptions: TradeOptions! ): SwapParameters! estimateGas( parameters: SwapParameters! chainId: ChainId ): BigInt! execCallStatic( parameters: SwapParameters! chainId: ChainId! txOverrides: TxOverrides ): Ethereum_StaticTxResult! createTrade( route: Route! amount: TokenAmount! tradeType: TradeType! ): Trade! tradeExecutionPrice( trade: Trade! ): String! tradeNextMidPrice( trade: Trade! ): String! tradeSlippage( trade: Trade! ): String! tradeMinimumAmountOut( trade: Trade! slippageTolerance: String! ): TokenAmount! tradeMaximumAmountIn( trade: Trade! slippageTolerance: String! ): TokenAmount! bestTradeExactIn( pairs: [Pair!]! amountIn: TokenAmount! tokenOut: Token! options: BestTradeOptions ): [Trade!]! bestTradeExactOut( pairs: [Pair!]! tokenIn: Token! amountOut: TokenAmount! options: BestTradeOptions ): [Trade!]! fetchTokenData( chainId: ChainId! address: String! symbol: String name: String ): Token! fetchPairData( token0: Token! token1: Token! ): Pair! fetchTotalSupply( token: Token! ): TokenAmount! fetchKLast( token: Token! ): BigInt! factoryAddress: String! initCodeHash: String! minimumLiquidity: UInt32! } type Mutation @imports( types: [ "Ethereum_Mutation", "Ethereum_Connection", "Ethereum_TxOverrides", "Ethereum_TxResponse", "Ethereum_Access", "Ethereum_TxReceipt", "Ethereum_Log", "Ethereum_TxRequest" ] ) { swap( tokenIn: Token! tokenOut: Token! amount: BigInt! tradeType: TradeType! tradeOptions: TradeOptions! txOverrides: TxOverrides ): Ethereum_TxResponse! exec( trade: Trade! tradeOptions: TradeOptions! txOverrides: TxOverrides ): Ethereum_TxResponse! execCall( parameters: SwapParameters! chainId: ChainId! txOverrides: TxOverrides ): Ethereum_TxResponse! approve( token: Token! amount: BigInt txOverrides: TxOverrides ): Ethereum_TxResponse! } type Currency { decimals: UInt8! symbol: String name: String } type Token { chainId: ChainId! address: String! currency: Currency! } type TokenAmount { token: Token! amount: BigInt! } type TradeOptions { allowedSlippage: String! recipient: String! unixTimestamp: UInt64! ttl: UInt32 deadline: UInt32 feeOnTransfer: Boolean } type Pair { tokenAmount0: TokenAmount! tokenAmount1: TokenAmount! } type Route { path: [Token!]! pairs: [Pair!]! input: Token! output: Token! } type Trade { route: Route! inputAmount: TokenAmount! outputAmount: TokenAmount! tradeType: TradeType! } type BestTradeOptions { maxNumResults: UInt32 maxHops: UInt32 } type SwapParameters { methodName: String! args: [String!]! value: String! } type TxOverrides { gasPrice: BigInt gasLimit: BigInt } enum ChainId { MAINNET ROPSTEN RINKEBY GOERLI KOVAN } enum TradeType { EXACT_INPUT EXACT_OUTPUT } enum Rounding { ROUND_DOWN ROUND_HALF_UP ROUND_UP } ### Imported Queries START ### type Ethereum_Query @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Query" ) { callContractView( address: String! method: String! args: [String!] connection: Ethereum_Connection ): String! callContractStatic( address: String! method: String! args: [String!] connection: Ethereum_Connection txOverrides: Ethereum_TxOverrides ): Ethereum_StaticTxResult! encodeParams( types: [String!]! values: [String!]! ): String! getSignerAddress( connection: Ethereum_Connection ): String! getSignerBalance( blockTag: BigInt connection: Ethereum_Connection ): BigInt! getSignerTransactionCount( blockTag: BigInt connection: Ethereum_Connection ): BigInt! getGasPrice( connection: Ethereum_Connection ): BigInt! estimateTransactionGas( tx: Ethereum_TxRequest! connection: Ethereum_Connection ): BigInt! estimateContractCallGas( address: String! method: String! args: [String!] connection: Ethereum_Connection txOverrides: Ethereum_TxOverrides ): BigInt! checkAddress( address: String! ): Boolean! toWei( eth: String! ): BigInt! toEth( wei: BigInt! ): String! awaitTransaction( txHash: String! confirmations: UInt32! timeout: UInt32! connection: Ethereum_Connection ): Ethereum_TxReceipt! waitForEvent( address: String! event: String! args: [String!] timeout: UInt32 connection: Ethereum_Connection ): Ethereum_EventNotification! } type SHA3_Query @imported( uri: "w3://ens/sha3.web3api.eth", namespace: "SHA3", nativeType: "Query" ) { sha3_512( message: String! ): String! sha3_384( message: String! ): String! sha3_256( message: String! ): String! sha3_224( message: String! ): String! keccak_512( message: String! ): String! keccak_384( message: String! ): String! keccak_256( message: String! ): String! keccak_224( message: String! ): String! hex_keccak_256( message: String! ): String! buffer_keccak_256( message: Bytes! ): String! shake_128( message: String! outputBits: Int! ): String! shake_256( message: String! outputBits: Int! ): String! } type Logger_Query @imported( uri: "w3://w3/logger", namespace: "Logger", nativeType: "Query" ) { log( level: Logger_LogLevel! message: String! ): Boolean! } type Ethereum_Mutation @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Mutation" ) { callContractMethod( address: String! method: String! args: [String!] connection: Ethereum_Connection txOverrides: Ethereum_TxOverrides ): Ethereum_TxResponse! callContractMethodAndWait( address: String! method: String! args: [String!] connection: Ethereum_Connection txOverrides: Ethereum_TxOverrides ): Ethereum_TxReceipt! sendTransaction( tx: Ethereum_TxRequest! connection: Ethereum_Connection ): Ethereum_TxResponse! sendTransactionAndWait( tx: Ethereum_TxRequest! connection: Ethereum_Connection ): Ethereum_TxReceipt! deployContract( abi: String! bytecode: String! args: [String!] connection: Ethereum_Connection ): String! signMessage( message: String! connection: Ethereum_Connection ): String! sendRPC( method: String! params: [String!]! connection: Ethereum_Connection ): String } ### Imported Queries END ### ### Imported Objects START ### type Ethereum_Connection @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Connection" ) { node: String networkNameOrChainId: String } type Ethereum_TxOverrides @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxOverrides" ) { gasLimit: BigInt gasPrice: BigInt value: BigInt } type Ethereum_StaticTxResult @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "StaticTxResult" ) { result: String! error: Boolean! } type Ethereum_TxRequest @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxRequest" ) { to: String from: String nonce: UInt32 gasLimit: BigInt gasPrice: BigInt data: String value: BigInt chainId: UInt32 type: UInt32 } type Ethereum_TxReceipt @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxReceipt" ) { to: String! from: String! contractAddress: String! transactionIndex: UInt32! root: String gasUsed: BigInt! logsBloom: String! transactionHash: String! logs: [Ethereum_Log!]! blockNumber: BigInt! blockHash: String! confirmations: UInt32! cumulativeGasUsed: BigInt! byzantium: Boolean! status: UInt32 } type Ethereum_Log @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Log" ) { blockNumber: BigInt! blockHash: String! transactionIndex: UInt32! removed: Boolean! address: String! data: String! topics: [String!]! transactionHash: String! logIndex: UInt32! } type Ethereum_EventNotification @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "EventNotification" ) { data: String! address: String! log: Ethereum_Log! } type Ethereum_TxResponse @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "TxResponse" ) { hash: String! to: String from: String! nonce: UInt32! gasLimit: BigInt! gasPrice: BigInt! data: String! value: BigInt! chainId: UInt32! blockNumber: BigInt blockHash: String timestamp: UInt32 confirmations: UInt32! raw: String r: String s: String v: UInt32 type: UInt32 accessList: [Ethereum_Access!] } type Ethereum_Access @imported( uri: "w3://ens/ethereum.web3api.eth", namespace: "Ethereum", nativeType: "Access" ) { address: String! storageKeys: [String!]! } enum Logger_LogLevel @imported( namespace: "Logger", uri: "w3://w3/logger", nativeType: "LogLevel" ) { DEBUG INFO WARN ERROR } ### Imported Objects END ###