congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo For Javascript
web3-eth-abi
Code IndexAdd Tabnine to your IDE (free)

How to use web3-eth-abi

Best JavaScript code snippets using web3-eth-abi(Showing top 9 results out of 315)

origin: merklejerk/flex-contract

function encodeParameter(type, value) {
  assert(!_.isNil(value));
  return abiEncoder.encodeParameter(type, normalizeEncodeValue(type, value));
}
origin: merklejerk/flex-contract

function encodeFunctionCall(def, args=[]) {
  return abiEncoder.encodeFunctionCall(
    def,
    normalizeEncodeInput(def.inputs, args),
  );
}
origin: merklejerk/flex-contract

function encodeConstructorCall(bytecode, def, args=[]) {
  return util.addHexPrefix(bytecode) +
    util.stripHexPrefix(abiEncoder.encodeParameters(
      def.inputs,
      normalizeEncodeInput(def.inputs, args),
    ));
}
origin: merklejerk/flex-contract

function decodeCallOutput(outputs, data) {
  return normalizeDecodedOutput(
    outputs,
    abiEncoder.decodeParameters(outputs, data));
}
origin: merklejerk/flex-contract

function encodeLogSignature(def) {
  return abiEncoder.encodeEventSignature(def);
}
origin: merklejerk/flex-contract

function encodeLogTopicsFilter(def, args=[]) {
  const topicArgs = [];
  assert(def.inputs.length == args.length);
  for (let i = 0; i < args.length; i++) {
    if (def.inputs[i].indexed) {
      if (!_.isNil(args[i]))
        topicArgs.push(encodeParameter(def.inputs[i].type, args[i]));
      else
        topicArgs.push(null);
    }
  }
  return [abiEncoder.encodeEventSignature(def), ...topicArgs];
}
origin: merklejerk/flex-contract

function decodeLogItemArgs(def, log) {
  return normalizeDecodedOutput(
    def.inputs,
    abiEncoder.decodeLog(
      def.inputs,
      log.data,
      log.topics.slice(1)));
}
origin: ConsenSys/abi-decoder

const abiItem = state.methodIDs[methodID];
if (abiItem) {
 let decoded = abiCoder.decodeParameters(abiItem.inputs, data.slice(10));
origin: ConsenSys/abi-decoder

const decodedData = abiCoder.decodeParameters(
 dataTypes,
 logData.slice(2)
web3-eth-abi(npm)

Most used web3-eth-abi functions

  • decodeParameters
  • decodeLog
  • encodeEventSignature
  • encodeFunctionCall
  • encodeParameter

Popular in JavaScript

  • semver
    The semantic version parser used by npm.
  • chalk
    Terminal string styling done right
  • body-parser
    Node.js body parsing middleware
  • async
    Higher-order functions and common patterns for asynchronous code
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • mongodb
    The official MongoDB driver for Node.js
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • webpack
    Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now