Skip to content

Commit

Permalink
add link to JSON interface spec docs (#6832)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyborgRen committed Feb 27, 2024
1 parent 95807a6 commit afece40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web3-eth-abi/src/api/functions_api.ts
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

1 comment on commit afece40

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: afece40 Previous: 6c075db Ratio
processingTx 9635 ops/sec (±3.69%) 9301 ops/sec (±4.81%) 0.97
processingContractDeploy 39145 ops/sec (±7.69%) 39129 ops/sec (±7.62%) 1.00
processingContractMethodSend 19600 ops/sec (±6.04%) 19443 ops/sec (±5.19%) 0.99
processingContractMethodCall 40644 ops/sec (±4.95%) 38971 ops/sec (±6.34%) 0.96
abiEncode 47433 ops/sec (±6.28%) 44252 ops/sec (±6.92%) 0.93
abiDecode 31566 ops/sec (±7.03%) 30419 ops/sec (±8.89%) 0.96
sign 1670 ops/sec (±0.85%) 1656 ops/sec (±4.08%) 0.99
verify 373 ops/sec (±2.49%) 373 ops/sec (±0.78%) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.