0.1.1 • Published 11 months ago

abi-to-solidity-interface v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Convert Ethereum ABI to Solidity Interface

Install

npm install abi-to-solidity-interface

Usage

import { abiToSolidityInterface } from "abi-to-solidity-interface";

const abi = [
  {
    inputs: [],
    name: "add",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "count",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

const contractName = "Counter";

const solidityInterface = abiToSolidityInterface(abi, contractName);
interface Counter {
  function add();
  function count() external view returns (uint256);
}
0.1.1

11 months ago

0.1.0

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago