Compare commits
6 Commits
v7.0.0
...
1dc54eccea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dc54eccea
|
||
|
|
bb662e377c
|
||
|
|
d6bbc441f8
|
||
|
|
46090b3740
|
||
|
|
828f831c52
|
||
|
|
500180c6da
|
32
README.md
32
README.md
@@ -1,4 +1,5 @@
|
|||||||
[](https://www.npmjs.com/package/kredits-contracts)
|
[](https://www.npmjs.com/package/@kredits/contracts)
|
||||||
|
[](https://drone.kosmos.org/kredits/contracts)
|
||||||
|
|
||||||
# Kredits Contracts
|
# Kredits Contracts
|
||||||
|
|
||||||
@@ -26,27 +27,27 @@ To run a local development chain run:
|
|||||||
|
|
||||||
### Bootstrap
|
### Bootstrap
|
||||||
|
|
||||||
1. Run an Ethereum node and ipfs
|
1. Run an EVM node and ipfs
|
||||||
|
|
||||||
$ npm run devchain
|
$ npm run devchain
|
||||||
$ ipfs daemon
|
$ ipfs daemon
|
||||||
|
|
||||||
2. Compile contracts and build ABIs
|
2. Compile contracts and build ABIs
|
||||||
|
|
||||||
(compiled artifacts will be in `/artifacts`)
|
(compiled artifacts will be in `/artifacts`)
|
||||||
$ npm run build
|
$ npm run build
|
||||||
|
|
||||||
3. Deploy new upgradable contract proxies
|
3. Deploy new upgradable contract proxies
|
||||||
|
|
||||||
$ npm run deploy:dao
|
$ npm run deploy:dao
|
||||||
|
|
||||||
4. Execute seeds to create demo contributors, contributions, etc. (optional)
|
4. Execute seeds to create demo contributors, contributions, etc. (optional)
|
||||||
|
|
||||||
$ npm run seeds
|
$ npm run seeds
|
||||||
|
|
||||||
**Step 2-4 is also summarized in `npm run bootstrap`**
|
**Step 2-4 is also summarized in `npm run bootstrap`**
|
||||||
|
|
||||||
5. Show contract addresses
|
5. Show contract addresses
|
||||||
|
|
||||||
$ cat lib/addresses.json
|
$ cat lib/addresses.json
|
||||||
|
|
||||||
@@ -56,6 +57,16 @@ If you need to fund development accounts with devchain coins:
|
|||||||
|
|
||||||
$ npm run fund # or hardhat fund --network localhost
|
$ npm run fund # or hardhat fund --network localhost
|
||||||
|
|
||||||
|
## Specs / Testing
|
||||||
|
|
||||||
|
With a local development chain running:
|
||||||
|
|
||||||
|
$ hardhat test
|
||||||
|
|
||||||
|
If you add or change contract code, please make sure to add and/or adapt tests
|
||||||
|
accordingly. Don't worry, it's easy! You can use existing tests as a template
|
||||||
|
for new ones.
|
||||||
|
|
||||||
## Contract architecture
|
## Contract architecture
|
||||||
|
|
||||||
We use the [OpenZeppelin hardhat
|
We use the [OpenZeppelin hardhat
|
||||||
@@ -145,12 +156,3 @@ To run the console on one of the non localhost networks you can also just pass
|
|||||||
on the --network argument.
|
on the --network argument.
|
||||||
|
|
||||||
$ hardhat console --network rsk
|
$ hardhat console --network rsk
|
||||||
|
|
||||||
|
|
||||||
## Known Issues
|
|
||||||
|
|
||||||
When resetting ganache Metamask might have an invalid transaction nonce and
|
|
||||||
transactions get rejected. Nonces in Ethereum must be incrementing and have no
|
|
||||||
gap.
|
|
||||||
|
|
||||||
To solve this reset the metamask account (Account -> Settings -> Reset Account)
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const contractCalls = [
|
|||||||
name: 'raucao',
|
name: 'raucao',
|
||||||
kind: 'person',
|
kind: 'person',
|
||||||
url: '',
|
url: '',
|
||||||
github_username: 'skddc',
|
github_username: 'raucao',
|
||||||
github_uid: 842,
|
github_uid: 842,
|
||||||
gitea_username: 'raucao',
|
gitea_username: 'raucao',
|
||||||
wiki_username: 'Basti',
|
wiki_username: 'Basti',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ contract Reimbursement is Initializable {
|
|||||||
struct ReimbursementData {
|
struct ReimbursementData {
|
||||||
uint32 recipientId;
|
uint32 recipientId;
|
||||||
uint256 amount;
|
uint256 amount;
|
||||||
|
// TODO remove token entirely
|
||||||
address token;
|
address token;
|
||||||
bytes32 hashDigest;
|
bytes32 hashDigest;
|
||||||
uint8 hashFunction;
|
uint8 hashFunction;
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "@kredits/contracts",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kredits-contracts",
|
"name": "@kredits/contracts",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kosmos/schemas": "^3.1.0",
|
"@kosmos/schemas": "^3.1.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kredits/contracts",
|
"name": "@kredits/contracts",
|
||||||
"version": "7.0.0",
|
"version": "7.0.1",
|
||||||
"description": "Smart contracts and JavaScript API for Kredits",
|
"description": "Smart contracts and JavaScript API for Kredits",
|
||||||
"main": "./lib/kredits.js",
|
"main": "./lib/kredits.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
Reference in New Issue
Block a user