Code Monkey home page Code Monkey logo

sc-sets-collab's Introduction

This repo and contracts is based on the Enterprise Ethereum Middleware template libary and packaged so it can be deployed via the BPaaS

Deploy

The middleware admin user is created with the mnemonic of the blockchain node. So, in order to provide required roles to the admin user, you need to replace the config constants in the ./hardhat.config.ts with following and replace <your_node_public_key>, <your_node_menomic>, <your_node_derivation_path> and <your_node_private_key> from your node's details page.

const config: HardhatUserConfig = {
  ...bpaasConfig,
  namedAccounts: {
    ...bpaasConfig.namedAccounts,
    "deployer": {
      "default": "<your_node_public_key>"
    }
  },
  networks:
    // add allowUnlimitedContractSize to the each value inside bpaasConfig.networks

    bpaasConfig.networks
      ? Object.keys(bpaasConfig.networks).reduce((acc: any, networkName: string) => {
          if (bpaasConfig.networks && bpaasConfig.networks[networkName]) {
            acc[networkName] = {
              ...bpaasConfig.networks[networkName],
              allowUnlimitedContractSize: true,
              accounts: networkName==='hardhat'? {
                mnemonic: '<your_node_menomic>',
                path: "<your_node_derivation_path>"
              }: ['<your_node_private_key>']
            };
            return acc;
          }
        }, {})
      : {},
};

To deploy this smart contract set, execute yarn smartcontract:deploy or to deploy again from scratch, execute yarn smartcontract:deploy:reset.

In _helpers/util/global.ts you can limit the smart contracts that are being deployed by updating the enabledFeatures constants.

Using the smart contracts with the Enterprise Ethereum Middleware

Execute yarn middleware:package to generate a compressed file which contains all the contract artifacts. This will generate a file ./deployments-for-middleware.tar.gz. Right click on it and select Download. Later, unzip that file locally.

Then log in to the Middleware and either use the big button at the top if you have never imported contracts yet, or on the left to the contracts section. Then upload all these json files which are present inside in one go.

It will import the json files, and then restart, this can take a while, do not panic if you get errors at this point.

sc-sets-collab's People

Contributors

ashlesh-settlemint avatar

Watchers

 avatar

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.