Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating readContract args to take in any for the value #300

Merged
merged 5 commits into from
Oct 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change to any
  • Loading branch information
rohan-agarwal-coinbase committed Oct 19, 2024
commit 2cf0726be661d3f6e63365c4addc4177dc493acf
4 changes: 2 additions & 2 deletions src/coinbase/read_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
* @param {TFunctionName} params.method - The contract method to call.
* @param {TArgs} params.args - The arguments for the contract method.
* @param {TAbi} [params.abi] - The contract ABI (optional).
* @returns {Promise<any>} The result of the contract call.
* @returns {Promise<TAbi extends Abi ? ContractFunctionReturnType<TAbi, Extract<TFunctionName, ContractFunctionName<TAbi, "view" | "pure">>, TArgs> : unknown>} The result of the contract call.

Check warning on line 113 in src/coinbase/read_contract.ts

View workflow job for this annotation

GitHub Actions / lint

Syntax error in type: Promise<TAbi extends Abi ? ContractFunctionReturnType<TAbi, Extract<TFunctionName, ContractFunctionName<TAbi, "view" | "pure">>, TArgs> : unknown>
*/
export async function readContract<
TAbi extends Abi | undefined,
Expand Down Expand Up @@ -148,6 +148,6 @@
Extract<TFunctionName, ContractFunctionName<TAbi, "view" | "pure">>,
TArgs
>
: unknown
: any
>(response.data);
}
Loading