Smart contracts for the Besu permissioning system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Chris Mckay 0d3dab84ad
[OP-62] release job (#117)
5 years ago
contracts [op-46] contracts emit adjustment events (#113) 5 years ago
migrations Deployed admin before the rules contracts then look it up (#119) 5 years ago
nginx/conf.d [OP-15] contracts and dapp restructure (#85) 5 years ago
public [OP-15] contracts and dapp restructure (#85) 5 years ago
src [OP-62] release job (#117) 5 years ago
test [op-46] contracts emit adjustment events (#113) 5 years ago
.dockerignore [OP-15] contracts and dapp restructure (#85) 5 years ago
.editorconfig [OP-15] contracts and dapp restructure (#85) 5 years ago
.gitignore [OP-15] typescript contracts and tests (#91) 5 years ago
.prettierignore Added prettier for code style checking (#102) 5 years ago
.solcover.js [OP-15] contracts and dapp restructure (#85) 5 years ago
.soliumignore solium linting (#9) 6 years ago
.soliumrc.json PIE-1515: Rules contract with linked list library (#39) 6 years ago
.yarnrc [OP-62] release job (#117) 5 years ago
CLA.md Added OS documentation (#28) 6 years ago
CODE-OF-CONDUCT.md Added OS documentation (#28) 6 years ago
CONTRIBUTING.md Added OS documentation (#28) 6 years ago
Dockerfile [OP-15] contracts and dapp restructure (#85) 5 years ago
GOVERNANCE.md Added OS documentation (#28) 6 years ago
Jenkinsfile [OP-62] release job (#117) 5 years ago
Jenkinsfile.release [OP-62] release job (#117) 5 years ago
LICENSE Setting up (#1) 6 years ago
README.md removed app/ dir instructions (#108) 5 years ago
genesis.json PIE-1698: Fix account ingress logic when no rules contract has been set (#84) 5 years ago
jest.config.js [OP-15] typescript contracts and tests (#91) 5 years ago
mocha-reporter-config.json Jenkins recording test results (#25) 6 years ago
package.json [op-15] replace initialisation guard and remove drizzle (#116) 5 years ago
truffle-box.json Setting up (#1) 6 years ago
truffle-config.js [Tooling] switch to yarn (#92) 5 years ago
tsconfig.json [OP-15] contracts and dapp restructure (#85) 5 years ago
yarn.lock [op-15] replace initialisation guard and remove drizzle (#116) 5 years ago

README.md

Permissioning Smart Contracts

Note: The contracts in this repository are currently in the process of going through a third party audit. Please contact us before using in a production environment.

Using

The Pantheon documentation describes how to use the contracts for onchain permissioning.

Development

Linting

Linting is set up using solium. To run it over your code execute yarn run lint.

Testing

yarn test

Permissioning Management Dapp (under development)

The Permissisioning Management Dapp is still in BETA. It is under active development and shouldn't be used in any production system.

The Dapp will facilitate managing permissioning rules and maintaining the list of admin accounts that can edit rules.

At the moment, these instructions won't say anything about linking the Dapp with your Pantheon node. This integration will be documented in the future. The instructions here are targeted to developers working on the Dapp development, not users.

This is the easiest way to get started for development with the permissioning Dapp:

Compile and migrate the contracts

  1. Get rid of your environment variables named NODE_INGRESS_CONTRACT_ADDRESS and ACCOUNT_INGRESS_CONTRACT_ADDRESS - you might need to restart your terminal session after removing it to have your changes applied. If you are using a .env file, you can comment out the variables.
  2. Start a terminal session and start a truffle Ganache node running truffle develop. This will start a Ganache node and create a truffle console session.
  3. In the truffle console, run all migrations from scratch with migrate --reset. Keep this terminal session open to maintain your Ganache node running.

Start the development server

  1. Run yarn install to install all required dependencies. (You only need to run yarn install if you are running the app for the first time.)
  2. Run yarn run build to build the dapp.
  3. Run yarn run start to start the web server that is serving our dapp.
  4. In your browser, connect Metamask to the Ganache network (the default endpoint is http://127.0.0.1:9545/)
  5. When you start Ganache, it gives you a list of accounts and private keys. Import the first one in Metamask to impersonate the first admin of the system.
  6. Navigate to http://localhost:3000 to access the Permissioning Dapp.
  7. All changes made to the smart contracts or to the dapp code are automatically refreshed on the website. There is no need to restart the web server after making changes.

Build the permissioning Dapp for deployment

  1. Compile and migrate the contracts
  2. Run yarn run build will assemble index.html and all other files in build/
  3. You can use your preferred web server technology to serve the contents of build/ as static files.
  4. You will need to set up MetaMask as for the development server