@kodex-data/evm-contracts
v0.0.1-rc.10
Published
This is a package that provides utilities and modules for Ethereum Virtual Machine (EVM) contracts.
Downloads
18
Readme
@kodex-data/evm-contracts
This is a package that provides utilities and modules for Ethereum Virtual Machine (EVM) contracts using open zeppelin library
____ __. .___ ________ __
| |/ _|____ __| _/____ ___ ___ \______ \ _____ _/ |______
| < / _ \ / __ |/ __ \\ \/ / | | \\__ \\ __\__ \
| | ( <_> ) /_/ \ ___/ > < | ` \/ __ \| | / __ \_
|____|__ \____/\____ |\___ >__/\_ \ /_______ (____ /__| (____ /
\/ \/ \/ \/ \/ \/ \/
kodexdata.systems
Installation
To install @kodex-data/evm-contracts
, you can use npm
or yarn
:
npm install @kodex-data/evm-contracts
# or
yarn add @kodex-data/evm-contracts
Example
To use this module, you would need to import the objects and types you need from the module. For example, if you wanted to use the ERC20 contract, you would import the ERC20 type and the ERC20__factory object from the module:
import { ERC20, ERC20__factory } from '@kodex-data/evm-contracts';
const erc20 = ERC20__factory.connect(contractAddress, provider);
// Use erc20 object to interact with the ERC20 contract.
Similarly, if you wanted to create a new instance of the ERC20 contract, you would use the factory object:
const erc20Factory = new ERC20__factory(signer);
const erc20 = await erc20Factory.deploy(name, symbol, decimals);
// Use erc20 object to interact with the new instance of the ERC20 contract.
Type Aliases
- AccessControl
- ByteStore
- DoubleEndedQueue
- ERC165
- ERC20
- ERC20Permit
- ERC20PermitToken
- ERC721
- ERC721Burnable
- ERC721Enumerable
- ERC721URIStorage
- ERC721Votes
- EvmAuth
- EvmTicket
- ForAgainstQuorum
- ForAgainstWeightedQuorum
- Governor
- GovernorCountingSimple
- HashStore
- IAccessControl
- IERC1155Receiver
- IERC165
- IERC20
- IERC20Metadata
- IERC20Permit
- IERC721
- IERC721Enumerable
- IERC721Metadata
- IERC721Receiver
- IGovernor
- IVotes
- Moderatable
- Multicall2
- Ownable
- PhxCollectible
- Treasury
- Votes
Objects
- factories: An object containing the factories for each of the EVM contracts listed above.
- AccessControl__factory
- ByteStore__factory
- DoubleEndedQueue__factory
- ERC165__factory
- ERC20__factory
- ERC20Permit__factory
- ERC20PermitToken__factory
- ERC721__factory
- ERC721Burnable__factory
- ERC721Enumerable__factory
- ERC721URIStorage__factory
- ERC721Votes__factory
- EvmAuth__factory
- EvmTicket__factory
- ForAgainstQuorum__factory
- ForAgainstWeightedQuorum__factory
- Governor__factory
- GovernorCountingSimple__factory
- HashStore__factory
- IAccessControl__factory
- IERC1155Receiver__factory
- IERC165__factory
- IERC20__factory
- IERC20Metadata__factory
- IERC20Permit__factory
- IERC721__factory
- IERC721Enumerable__factory
- IERC721Metadata__factory
- IERC721Receiver__factory
- IGovernor__factory
- IVotes__factory
- Moderatable__factory
- Multicall2__factory
- Ownable__factory
- PhxCollectible__factory
- Treasury__factory