Code Monkey home page Code Monkey logo

composables-998's People

Contributors

achadha235 avatar mattlockyer avatar mudgen avatar nathalie-ckc 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  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  avatar  avatar  avatar  avatar

composables-998's Issues

Very confusing naming/design with TopDown and BottomUp

Why was 998 the contract split and renamed in two? Top down and bottom up. Doesn't make much sense to me both conceptually (only the parent should be composable) and in terms of the naming. Parent should be parent. Child should be child and may have a separate extra interface to communicate with the parent. I suggest to rename ERC998ERC721TopDown back to simply ERC998. And have ERC998Child interface if you want to have extra logic for the children, callbacks from the parents, etc. Like look at what ERC721 done with ERC721 and ERC721Receiver.

To do: Add top-down test coverage

Per discussion in the 2nd Composables call, creating "to do" items in Github Issues for areas where we could use help from devs who want to contribute.

Duplicate Contracts Added To NFT

I am really liking composable NFTs!

I noticed that the childReceived function will add duplicate contracts to childContracts[_tokenId] if multiple tokens from the same contract are transferred. When this happens the childContractsOwnedBy will return duplicate contracts, and this will cause other problems in the contract.

It seems that if a contract has already been added to childContracts[_tokenId] then it should not be added again.

To do: Add general test coverage

Per discussion in the 2nd Composables call, creating "to do" items in Github Issues for areas where we could use help from devs who want to contribute.

1_initial_migration.js fails

Trying to build this project so I can extend it, but it does not migrate...

Truffle config:

module.exports = {
  compilers: {
    solc: {
      version: "0.4.24",    // Fetch exact version from solc-bin (default: truffle's version)
      // docker: true,        // Use "0.5.1" you've installed locally with docker (default: false)
       settings: {          // See the solidity docs for advice about optimization and evmVersion
        optimizer: {
          enabled: false,
          runs: 200
        },
        evmVersion: "homestead"
       }
    }
  },
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      //gas: 8000000,
      network_id: "*" // Match any network id
    }
  }
};

The migrations file is unchanged, but will not deploy...

const Migrations = artifacts.require("./Migrations.sol");
const Composable = artifacts.require("./ComposableTopDown.sol");
const SampleNFT = artifacts.require("./SampleNFT.sol");
const SampleERC20 = artifacts.require("./SampleERC20.sol");

module.exports = function(deployer) {
  deployer.deploy(Migrations);
  //deployer.deploy(Composable, "ComposableTopDown", "COMPTD", {gas: 8000000});
  deployer.deploy(Composable, "ComposableTopDown", "COMPTD");
  deployer.deploy(SampleNFT, "SampleNFT", "SNFT");
  deployer.deploy(SampleERC20);
};

The error message I get is

1_initial_migration.js
======================

   Replacing 'Migrations'
   ----------------------
   > transaction hash:    0x157a6d4092b3290d2ac633726162844c5f9551b4cb5bb18b43dde72bc4798345
   > Blocks: 0            Seconds: 0
   > contract address:    0xb98c7CDE39CA5687e673BE940287A80DBFC98E6e
   > block number:        15
   > block timestamp:     1639655894
   > account:             0xA9981301919D090b015eDF55a84FE0072A25ba28
   > balance:             99.82268304
   > gas used:            238174 (0x3a25e)
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.00476348 ETH


   Deploying 'ComposableTopDown'
   -----------------------------

Error:  *** Deployment Failed ***

"ComposableTopDown" ran out of gas. Something in the constructor (ex: infinite loop) caused gas estimation to fail. Try:
   * Making your contract constructor more efficient
   * Setting the gas manually in your config or as a deployment parameter
   * Using the solc optimizer settings in 'truffle-config.js'
   * Setting a higher network block limit if you are on a
     private network or test client (like ganache).

    at C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\deployer\src\deployment.js:365:1
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Migration._deploy (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:70:1)
    at Migration._load (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:56:1)
    at Migration.run (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\Migration.js:217:1)
    at Object.runMigrations (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:150:1)
    at Object.runFrom (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:110:1)
    at Object.runAll (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:114:1)
    at Object.run (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\migrate\index.js:79:1)
    at runMigrations (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:258:1)
    at Object.run (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:223:1)
    at Command.run (C:\Users\O\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\command.js:183:1)
Truffle v5.4.11 (core: 5.4.11)
Node v14.17.5

To do: Add bottom-up test coverage

Per discussion in the 2nd Composables call, creating "to do" items in Github Issues for areas where we could use help from devs who want to contribute.

Error while running truffle test

I cloned the repo and ran npm i followed by truffle test.
I am getting the following error - Error: while migrating ComposableTopDown: Returned error: VM Exception while processing transaction: out of gas

Truffle v5.1.25 (core: 5.1.25)
Node v10.16.3
Solidity Compiler Version - 0.4.24

Please advise.

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.