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

add link to JSON interface spec docs #6832

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions packages/web3-eth-abi/src/api/functions_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import { AbiFunctionFragment } from 'web3-types';
import { isAbiFunctionFragment, jsonInterfaceMethodToString } from '../utils.js';
import { encodeParameters } from './parameters_api.js';

// todo Add link to JSON interface documentation
/**
* Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including types.
* The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json
* @param functionName - The function name to encode or the `JSON interface` object of the function.
* If the passed parameter is a string, it has to be in the form of `functionName(param1Type,param2Type,...)`. eg: myFunction(uint256,uint32[],bytes10,bytes)
* @returns - The ABI signature of the function.
Expand Down Expand Up @@ -75,9 +75,9 @@ export const encodeFunctionSignature = (functionName: string | AbiFunctionFragme
return sha3Raw(name).slice(0, 10);
};

// todo Add link to JSON interface documentation
/**
* Encodes a function call using its `JSON interface` object and given parameters.
* The JSON interface spec documentation https://docs.soliditylang.org/en/latest/abi-spec.html#json
* @param jsonInterface - The `JSON interface` object of the function.
* @param params - The parameters to encode
* @returns - The ABI encoded function call, which, means the function signature and the parameters passed.
Expand Down
Loading