Celo核心合同
Celo协议的智能合同ABIS.
使用量
安装
npm install @celo/abis
或者说
yarn add @celo/abis
在你的日记或T
// abi in json
import AccountsABI from '@celo/abis/Accounts.json'
// abi in js/ts for viem, wagmi, etc
import { accountsABI } from '@celo/abis'
// abi in js/ts for viem, wagmi, etc (with moduleResolution and module set to "Node16" in your tsconfig.json file)
import { accountsABI } from '@celo/abis/Accounts'
// abi in js/ts for use with contractkit
import { type Accounts, newAccounts, ABI } from '@celo/abis/web3/Accounts'
普通JS 语法
const { accountsABI } = require('@celo/abis');
// viem
const accounts = getContract({
address: "0x...",
abi: accountsABI,
...
})
许可证
所有软件包都根据Apache 2.0许可的条款获得许可,除非在软件包根部的LICENSE文件中另有说明.