Package Exports
- @animoca/ethereum-contracts-assets_inventory
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@animoca/ethereum-contracts-assets_inventory) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Solidity Project Assets Inventory
This project serves as a base dependency for Solidity-based assets inventory contract projects by providing related base contracts, constants, and interfaces.
Table of Contents
Overview
Installation
Install as a module dependency in your host NodeJS project:
$ npm install --save @animoca/ethereum-contracts-assets_inventoryUsage
Solidity Contracts
Import dependency contracts into your Solidity contracts and derive as needed:
import "@animoca/ethereum-contracts-assets_inventory/contracts/{{Contract Group}}/{{Contract}}.sol"Test and Migration Scripts
Require the NodeJS module dependency in your test and migration scripts as needed:
const { constants, interfaces } = require('@animoca/ethereum-contracts-assets_inventory');Notes
IMPORTANT: Some tests might fail because of the following web3 bug: https://github.com/ethereum/web3.js/issues/3272. To solve it, the indexed keyword needs to be removed from tokenId field in the Transfer and Approval events of contracts/token/ERC721/IERC721.sol:
event Transfer(
address indexed _from,
address indexed _to,
uint256 /*indexed*/ _tokenId
);
event Approval(
address indexed _owner,
address indexed _approved,
uint256 /*indexed*/ _tokenId
);