An Ethereum contract that allows an Identity Owner
to stake KEY
in a Timelocked Escrow
so that a Service Provider
will offer them a priority service.
SKF
— The SelfKey Foundation.KEY
— an ERC20 token managed by the SelfKey Foundation.Identity Owner
— a party wishing to obtain services from aService Provider
, within a definedmarketplace
.Service Provider
– a party that provides services to anIdentity Owner
as part of an overallmarketplace
.marketplace
– a collection of whitelistedService Providers
with an associatedTimelocked Escrow
.Marketplace Manager
– a contract that can create newTimelocked Escrow
contracts forSKF
.Timelocked Escrow
– a vault that holdsKEY
for anIdentity Owner
for a defined time period, and which holds a whitelist ofService Providers
to whom theIdentity Owner
can transferKEY
.
An Identity Owner
that holds an amount of KEY
wanting to obtain services from a participating Service Provider
within a defined marketplace is required to deposit KEY
in a Timelocked Escrow
that has whitelisted that Service Provider
.
See the attached Timelocked Escrow Flow
PDF file.
The smart contracts are being implemented in Solidity 0.4.19
.
- NodeJS, version 9.5+ (I use
nvm
to manage Node versions —brew install nvm
.) - truffle, which is a comprehensive framework for Ethereum development.
npm install -g truffle
— this should install Truffle v4+. Check that withtruffle version
. - Access to the KYC_Chain Jira
npm install
npm test
or with code coverage
npm run test:cov
Run the truffle
development environment
truffle develop
then from the prompt you can run
compile
migrate
test
as well as other Truffle commands. See truffleframework.com for more.
We provide the following linting options
npm run lint:sol
— to lint the Solidity files, andnpm run lint:js
— to lint the Javascript.
Please see the contributing notes.