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
|
||||
|
||||
@@ -26,27 +27,27 @@ To run a local development chain run:
|
||||
|
||||
### Bootstrap
|
||||
|
||||
1. Run an Ethereum node and ipfs
|
||||
1. Run an EVM node and ipfs
|
||||
|
||||
$ npm run devchain
|
||||
$ ipfs daemon
|
||||
|
||||
2. Compile contracts and build ABIs
|
||||
2. Compile contracts and build ABIs
|
||||
|
||||
(compiled artifacts will be in `/artifacts`)
|
||||
$ npm run build
|
||||
|
||||
3. Deploy new upgradable contract proxies
|
||||
3. Deploy new upgradable contract proxies
|
||||
|
||||
$ 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
|
||||
|
||||
**Step 2-4 is also summarized in `npm run bootstrap`**
|
||||
|
||||
5. Show contract addresses
|
||||
5. Show contract addresses
|
||||
|
||||
$ 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
|
||||
|
||||
## 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
|
||||
|
||||
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.
|
||||
|
||||
$ 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',
|
||||
kind: 'person',
|
||||
url: '',
|
||||
github_username: 'skddc',
|
||||
github_username: 'raucao',
|
||||
github_uid: 842,
|
||||
gitea_username: 'raucao',
|
||||
wiki_username: 'Basti',
|
||||
|
||||
@@ -16,6 +16,7 @@ contract Reimbursement is Initializable {
|
||||
struct ReimbursementData {
|
||||
uint32 recipientId;
|
||||
uint256 amount;
|
||||
// TODO remove token entirely
|
||||
address token;
|
||||
bytes32 hashDigest;
|
||||
uint8 hashFunction;
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "kredits-contracts",
|
||||
"version": "7.0.0",
|
||||
"name": "@kredits/contracts",
|
||||
"version": "7.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "kredits-contracts",
|
||||
"version": "7.0.0",
|
||||
"name": "@kredits/contracts",
|
||||
"version": "7.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@kosmos/schemas": "^3.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kredits/contracts",
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.1",
|
||||
"description": "Smart contracts and JavaScript API for Kredits",
|
||||
"main": "./lib/kredits.js",
|
||||
"directories": {
|
||||
|
||||
Reference in New Issue
Block a user