function abiEncodeWithSelector(functionName, abiTypes, abiValues) {
  const abiEncoder = new ethers.utils.AbiCoder()
  const initData = abiEncoder.encode(abiTypes, abiValues)
  const selector = createSelector(functionName, abiTypes)
  const encoded = selector + initData.slice(2)
  return encoded
}
/**
 * This function reflects the usage of abi.encodeWithSelector in Solidity.
 * It prepends the selector to the ABI-encoded values.
 *
 * @param {string} functionName
 * @param {Array<string>} abiTypes
 * @param {Array<any>} abiValues
 */
This function reflects the usage of abi.encodeWithSelector in Solidity.
It prepends the selector to the ABI-encoded values.


This function reflects the usage of abi . encodeWithSelector in Solidity . It prepends the selector to the ABI - encoded values .
function abiEncodeWithSelector(functionName, abiTypes, abiValues) {
  const abiEncoder = new ethers.utils.AbiCoder()
  const initData = abiEncoder.encode(abiTypes, abiValues)
  const selector = createSelector(functionName, abiTypes)
  const encoded = selector + initData.slice(2)
  return encoded
}
function abiEncodeWithSelector ( functionName , abiTypes , abiValues ) { const abiEncoder = new ethers . utils . AbiCoder ( ) const initData = abiEncoder . encode ( abiTypes , abiValues ) const selector = createSelector ( functionName , abiTypes ) const encoded = selector + initData . slice ( 2 ) return encoded }
This function reflects the usage of abi.encodeWithSelector in Solidity.
This function reflects the usage of abi . encodeWithSelector in Solidity .