Internal EthWorks library for writing Solidity contracts
npm install -s ethworks/ethworks-solidity
Contracts can be imported in Solidity:
import "ethworks-solidity/contracts/CrowdfundableToken.sol";
contract MyToken is CrowdfundableToken {
(...)
}
Test utilities can be imported in JS:
import {deployContract, ...} from '../testUtils.js';
The following Smart Contracts are available:
- CrowdfundableToken
- LockingContract
- Whitelist
- Crowdsale
Contract for a mintable ERC20 token, that is frozen until all minting has been conducted.
Contract used for locking ERC20 tokens for a specified time period.
Event | Description |
---|---|
NotedTokens | Investor's tokens have been locked |
ReleasedTokens | Locked tokens have been released after locking period |
ReducedLockingTime | Locking period has been reduced |
Contract for a whitelist, typically used for KYC purposes.
Event | Description |
---|---|
AddedToWhitelist | Client has been added to the whitelist |
RemovedFromWhitelist | Client has been removed from the whitelist |
Base contract for organizing a crowdsale. This contract is meant for inheriting, and calling internal mint functions from child contracts.
Event | Description |
---|---|
Minted | Investor has made an investment, and the tokens have been minted |
The unit tests covering the smart contracts can be executed by running the following command:
npm run dev:test