0.1.5 • Published 4 years ago

ethereum-contract-sexy-manager v0.1.5

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Ethereum Contract Upgrade Manager

npm version badge

This is CLI to deploy your contract with upgradeable architecture.

Install

$ npm install -g ethereum-contract-sexy-manager

Architecture

architecture diagram

Jargon

  • Implementation
    The implementation is one or more contracts to be deployed. This repository has a sample contract.
  • Proxy
    This contract uses delegate call for implementation contract when it is called by user.
  • Proxy Admin
    This contract manages Proxy contract. This contract changes the implementation address stored on Proxy contract and the administrator.

Flow

There are three steps when the contract is deployed.

  1. Deploy the implementation you indicate with option.

  2. Deploy the Proxy Admin contract and store your address as the administrator.

  3. Deploy the Proxy and store the Proxy Admin address as manager.

Commands

$ sexydynamite init

Create .sexydynamite directory and admin.json you can set your wallet and private key here, and add admin.json file to .gitignore in order not to push your private information.

$ sexydynamite create -c {Contract Name V1}

Deploy your contract with above architecture. The contract needs to be compiled build/contracts directory. The project information is emited on .sexydynamite/deployed.json.

$ sexydynamite upgrade -c {Contract Name V2}

Upgrade your implementation to indicated contract. Your new implementation will be deployed and Proxy will use delegate call for new implementation.

Structure

(ProjectRoot)
--/.sexydynamite
    |--admin.json   <- Please fill in address and pribate key information.
    |--deployed.json    <- This will be emited when new implementation is deployed. This has contract address and owner of this architecture.

Test

$ truffle test

0.1.5

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.0

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago