Giter Site home page Giter Site logo

evm's Introduction

RMRK EVM Package

A set of Solidity smart contracts implementing RMRK modular NFTs and compatible extensions for them.

Smart contracts documentation as well as usage instructions and tutorials can be found in the RMRK EVM developer documentation

Usage

To use the RMRK legos and smart contracts contained in this repository, simply add them to your project:

yarn add @rmrk-team/evm-contracts

or

npm -i @rmrk-team/evm-contracts

Once the dependency is added to your project, simply import the smart contracts you wish to utilize into your own smart contract.

RMRK Legos

RMRK is a set of NFT standards that compose several NFT module primitives. Putting these modules together allows a user to create NFT systems of arbitrary complexity. So far we have created 6 modules as ERC proposals, all of which are ERC721 compatible. The first 5 are already standards, the 6th is still in Draft.

RMRK Modules

evm's People

Contributors

1337-ishaan avatar ayuilos avatar boynchan avatar cicadancr avatar dependabot[bot] avatar dev-andreavendrame avatar ed-iv avatar hadrysmateusz avatar martinloesethjensen avatar omahs avatar steven2308 avatar stevyhacker avatar swader avatar thunderdeliverer avatar yuripetusko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evm's Issues

Should `SetEquippableToAll(uint64 indexed partId)` be emitted when `_addEquippableAddresses` etc?

https://github.com/rmrk-team/evm/blob/master/contracts/RMRK/catalog/RMRKCatalog.sol

I found that when _addEquippableAddresses, _setEquippableAddresses or _resetEquippableAddresses,

delete _isEquippableToAll[partId]

is excuted, but no SetEquippableToAll(uint64 indexed partId) emit.

If your indexer just listen to SetEquippableToAll(...) event to update the equippableToAll state of part, you won't get the real time data.

Add Resource-replace param

When adding a new resource, an issuer should be able to specify the ID of an existing one which would get overwritten. This is necessary to be able to upgrade NFTs, change their parts, or even just do reveal mechanics of certain types.

This should be an extra parameter passed alongside the add resource call.

Add transferable flag

Simple “transferable” flag to be set on the collection, bool, set on mint and not mutable later. Needed for gems and all the “soulbound” stuff.

In Kusama’s implementation we also have a modifier for temporary transferability, so that you can say, this becomes non transferable after X blocks, or it is transferable for only X blocks, but to not complicate things just the basic boolean would do.

Concept is explained here.

Moar Tests

The following is a list of methods in the public API that looked like they could use test coverage:

  • General
    • approve
    • isApprovedOrOwner
    • getApproved
    • tokenURI
  • Resources
    • getResourceObject
    • getResourceOverwrites
    • hashResource16
  • Introspection
    • isRmrkCore
  • Nesting
    • deleteChildFromChildren
    • setChild
  • Transfers
    • transfer
    • transferFrom
  • Royalties
    • getRoyaltyData
    • setRoyaltyData

`safeNestTransfer` is redundant

function _safeNestTransfer(

The "safe" function is for preventing token wrongly sending to a common contract, the _nestTransfer has already been seen as one Nesting token be sent to another Nesting contract, it did contract interface check in internal code.

I think it's better to define a safeTransferNestingFrom function as I defined in PR before.
safeTransferFrom means "I wanna safe sending the token as a ERC721 to a common contract".
safeTransferNestingFrom means "I wanna safe sending the token as a Nesting to a common contract".

Catalog implementation with a mapping and method to get all partIds

Currently without the indexer or without quering all PartsAdded events, there's no way to get all partIds. It doesn't help also that partIds are not sequential.

It would be great to have an implementation of Catalog (and list it as recommended) which as a view function to get all part ids.

Deploy Issue

I have below error when i run deploy command: npx hardhat run scripts/deploy.ts

No need to generate any newer typings.
HardhatError: HH700: Artifact for contract "Greeter" not found.
at Artifacts._handleWrongArtifactForContractName (/Users/Waqar/Downloads/evm-master 2/node_modules/hardhat/src/internal/artifacts.ts:478:11)
at Artifacts._getArtifactPathFromFiles (/Users/Waqar/Downloads/evm-master 2/node_modules/hardhat/src/internal/artifacts.ts:592:19)
at Artifacts._getArtifactPath (/Users/Waqar/Downloads/evm-master 2/node_modules/hardhat/src/internal/artifacts.ts:275:17)
at async Artifacts.readArtifact (/Users/Waqar/Downloads/evm-master 2/node_modules/hardhat/src/internal/artifacts.ts:58:26)
at async getContractFactory (/Users/Waqar/Downloads/evm-master 2/node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:91:22)
at async main (/Users/Waqar/Downloads/evm-master 2/scripts/deploy.ts:17:19)

Plz help

unused function parameter

This makes my OCD really hard.
plz

Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> @rmrk-team/evm-contracts/contracts/RMRK/extension/RMRKRoyalties.sol:76:9:
   |
76 |         uint256 tokenId,
   |         ^^^^^^^^^^^^^^^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.