1.8.0 • Published 8 months ago

@keep-network/keep-ecdsa v1.8.0

Weekly downloads
697
License
MIT
Repository
github
Last release
8 months ago

Solidity

Configure Development Environment

NPM dependencies

The project uses GitHub Package Registry for keep-network dependencies. It requires `npm login --registry=https://npm.pkg.github.com to be executed to authenticate with GitHub account in order to access private packages. You can login with GitHub access token by providing your username and instead of password use the token.

Install the project dependencies:

npm install

keep-core contracts

This project depends on contracts migrated by keep-core project and expects its migration artifacts to be provided in artifacts directory. The contracts can be fetched from published NPM package or local source (for development) after running migrations in keep-core project.

To fetch required contracts addresses from local keep-core project use the following commands:

  • in keep-core/solidity directory execute: npm link,
  • in keep-ecdsa/solidity directory execute: npm link @keep-network/keep-core.

Remember that migration artifacts have to be available in artifacts directory. Truffle by default places them in build/contracts so you need to copy them or create a symlink.

Staking and bonding

Keeps creation depends on operator's KEEP token staking and available bonding value. To initialize the operator:

  1. Initialize token staking in keep-core:

    # Run from `keep-core/contracts/solidity` directory
    truffle exec ./scripts/demo.js --network local
  2. Initialize operator for Bonded ECDSA Keep Factory and TBTC System contract address.

    # Run from `keep-ecdsa/solidity` directory
    CLIENT_APP_ADDRESS="<TBTC_SYSTEM_ADDRESS>"\
        truffle exec scripts/lcl-initialize.js`

Usage

Currently contracts can be installed as npm dependency, in the future we may consider supporting EthPM.

Truffle

Truffle is a development framework for Ethereum.

To install it run:

npm install -g truffle

Configuration file truffle-config.js requires to contain a blockchain connection details. See next section for information on running a test blockchain.

Ganache

To start testing and developing you need to have a test blockchain set up. You can use Ganache for this.

To install Ganache on MacOS run:

brew cask install ganache

Open Ganache app and configure a server to be exposed with hostname 127.0.0.1 on port 8545.

Deploy contracts

To deploy contracts ensure Ganache is running and Truffle configured. If all is set run:

truffle migrate --reset

Command will output details of deployed contracts, find contract address value for each contract and copy-paste it to config.toml file.

Testing

Unit

Unit tests use Truffle's test framework, and redeploy contracts for a clean environment every test. An example:

truffle test test/BondedECDSAKeepTest.js

Scenarios

Tests in test/integration/ are for testing different scenarios in the Go client. They do not redeploy contracts, instead using the already deployed instances from truffle migrate.

truffle exec test/integration/keep_signing.js
1.9.0-sepolia.0

8 months ago

1.9.0-goerli.0

2 years ago

1.9.0-dev.1

2 years ago

1.9.0-dev.0

2 years ago

1.8.0-dev.4

2 years ago

1.8.0-dev.3

2 years ago

1.8.0

2 years ago

1.9.0-ropsten.0

2 years ago

1.9.0-ropsten.1

2 years ago

1.8.0-ropsten.2

2 years ago

1.8.0-ropsten.3

2 years ago

1.8.0-ropsten.1

2 years ago

1.8.0-dev.2

3 years ago

1.8.0-ropsten.0

3 years ago

1.8.0-dev.1

3 years ago

1.7.1-ropsten.0

3 years ago

1.8.0-dev.0

3 years ago

1.7.1-dev.0

3 years ago

1.7.0-dev.3

3 years ago

1.7.0

3 years ago

1.7.0-ropsten.5

3 years ago

1.7.0-ropsten.4

3 years ago

1.7.0-ropsten.3

3 years ago

1.7.0-dev.2

3 years ago

1.7.0-ropsten.2

3 years ago

1.7.0-ropsten.1

3 years ago

1.7.0-ropsten.0

3 years ago

1.7.0-dev.1

3 years ago

1.7.0-dev.0

3 years ago

1.7.0-pre.0

3 years ago

1.7.0-rc.4

3 years ago

1.7.0-rc.2

3 years ago

1.7.0-rc.3

3 years ago

1.7.0-rc.0

3 years ago

1.7.0-rc.1

3 years ago

1.7.0-pre.12

3 years ago

1.7.0-pre.11

3 years ago

1.7.0-pre.10

3 years ago

1.7.0-pre.9

3 years ago

1.7.0-pre.7

3 years ago

1.7.0-pre.8

3 years ago

1.7.0-pre.6

3 years ago

1.7.0-pre.5

3 years ago

1.7.0-pre.4

3 years ago

1.7.0-pre.3

3 years ago

1.7.0-pre.2

3 years ago

1.6.0

3 years ago

1.7.0-pre.1

3 years ago

1.6.0-pre.3

3 years ago

1.6.0-pre.2

3 years ago

1.5.1-rc.1

3 years ago

1.5.1-rc.0

3 years ago

1.6.0-pre.1

3 years ago

1.6.0-pre.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.2.0-rc.3

4 years ago

1.2.0-rc.2

4 years ago

1.2.0-rc.1

4 years ago

1.2.0-rc.0

4 years ago

1.2.0-pre.2

4 years ago

1.2.0-pre.1

4 years ago

1.2.0-pre

4 years ago

1.1.2-rc.0

4 years ago

1.1.1-rc.2

4 years ago

1.1.1-rc.0

4 years ago

1.1.1-rc.1

4 years ago

1.0.0

4 years ago

0.16.0-rc.0

4 years ago

0.15.0-rc.0

4 years ago

0.15.0-pre.5

4 years ago

0.15.0-pre.4

4 years ago

0.15.0-pre.3

4 years ago

0.15.0-pre.2

4 years ago

0.15.0-pre.1

4 years ago

0.15.0-pre.0

4 years ago

0.14.0-rc.1

4 years ago

0.14.0-rc.0

4 years ago

0.14.0-pre.14

4 years ago

0.14.0-pre.11

4 years ago

0.14.0-pre.13

4 years ago

0.14.0-pre.12

4 years ago

0.14.0-pre.10

4 years ago

0.13.0-rc.1

4 years ago

0.14.0-pre.8

4 years ago

0.14.0-pre.9

4 years ago

0.14.0-pre.6

4 years ago

0.14.0-pre.7

4 years ago

0.14.0-pre.5

4 years ago

0.14.0-pre.3

4 years ago

0.14.0-pre.4

4 years ago

0.14.0-pre.2

4 years ago

0.14.0-pre.1

4 years ago

0.14.0-pre.0

4 years ago

0.13.0-rc.0

4 years ago

0.13.0-pre.12

4 years ago

0.13.0-pre.11

4 years ago

0.13.0-pre.10

4 years ago

0.13.0-pre.9

4 years ago

0.13.0-pre.8

4 years ago

0.13.0-pre.7

4 years ago

0.13.0-pre.6

4 years ago

0.13.0-pre.5

4 years ago

0.13.0-pre.3

4 years ago

0.13.0-pre.4

4 years ago

0.13.0-pre.2

4 years ago

0.13.0-pre.1

4 years ago

0.13.0-pre.0

4 years ago

0.12.0-rc.0

4 years ago

0.12.0-pre.5

4 years ago

0.12.0-pre.4

4 years ago

0.12.0-pre.3

4 years ago

0.11.0-rc.0

4 years ago

0.12.0-pre.0

4 years ago

0.12.0-pre.2

4 years ago

0.12.0-pre.1

4 years ago

0.10.0-rc.1

4 years ago

0.10.0-rc.0

4 years ago

0.10.0-pre.0

4 years ago

0.8.0

4 years ago

0.1.2

4 years ago

0.1.7

4 years ago