/emergencycoin

ERC-20 coin with ability to set a backup address

Primary LanguageJavaScriptMIT LicenseMIT

Emergency Coin

ERC-20 token which allows the use of a backup address in the case of a compromised account. Setting a backup address allows that address to seize control of all established assets in the the event of a compromise.

Features

  • Standard features of ERC-20 tokens
  • Extensive usage of OpenZeppelin for well
  • Directly recover coins
  • Transfers to recovered accounts reverted
  • Recover tokens via simple signed

Incomplete Features

  • Transfers to recovered accounts redirect to backup address
  • Sign transactions with ERC-712

Installation

  1. Clone this repository
  2. Run npm install command to set up dependencies

Testing

To run the suite you must have installed the truffle library globally: npm install -g truffle

The test suite can be executed by running npm run test, npm test or directly running truffle test.

Deployment

Local

The npm install process will install ganache as a local development environment. It is not necessary to run a global Ganache instance, or the Ganache UI. The truffle default config will connect to this instance.

Run truffle deploy to deploy to the default development blockchain.

Test or Mainnet

Create a .env file in the base of the repository, and add the following requirements.

MNEMONIC=...
INFURA_API_KEY=...

The mnemonic should be a seed phrase to be used for deployment. The infura api key will be a key for an infura project.

Run truffle deploy -- network goerli or another network.