erc-tokens
v0.3.1
Published
> Autogenerated file. Do not edit manually.
Downloads
12
Readme
Autogenerated file. Do not edit manually.
erc-tokens
Install
$ npm install [email protected]
Contracts
- MMERC1155
- MMERC20
- MMERC721
Deployed Addresses
- MMERC1155
- Sepolia: _
- MMERC20
- Sepolia: 0x463c95cC04C5d58fb822309A9D4e2fdDdEd4EF4A
- MMERC721
- Sepolia: _
Usage Example
we can import contract's typescript type definition and abi, and then use them to create a contract instance and interactive with on-chain contracts using the instance:
import { MMERC1155 } from "erc-tokens/lib/contracts";
import { MMERC1155ABI } from "erc-tokens/lib/abi";
const contract: MMERC1155 = new ethers.Contract("0xAb...yZ", MMERC1155_ABI, provider) as unknown as MMERC1155;
or, we can create a contract instance use at(address)
directly and interactive with on-chain contracts using the instance:
import { MMERC1155 } from "erc-tokens/lib/contracts";
import { MMERC1155Contract } from "erc-tokens";
const contract: MMERC1155 = MMERC1155Contract.at("0xAb...yZ").connect(provider);
if you are using hardhat-deployed-records
plugin and config includeDeployed: true
, you can create a contract instance use at[network]()
with builtin contract address from this package:
import { MMERC1155 } from "erc-tokens/lib/contracts";
import { MMERC1155Contract } from "erc-tokens";
const contract: MMERC1155 = MMERC1155Contract.atSepolia().connect(provider);