Compare commits

...

6 Commits

Author SHA1 Message Date
Râu Cao
1dc54eccea Update seeds
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-22 18:15:51 +07:00
Râu Cao
bb662e377c Update README
All checks were successful
continuous-integration/drone/push Build is passing
* Add build status badge
* Add section about testing
* Formatting
2023-03-22 18:14:12 +07:00
Râu Cao
d6bbc441f8 Update package name in lockfile
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-19 14:52:32 +08:00
Râu Cao
46090b3740 Update README
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-04 12:27:16 +01:00
Râu Cao
828f831c52 7.0.1
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 19:07:56 +01:00
Râu Cao
500180c6da Update npm badge
Some checks are pending
continuous-integration/drone/push Build is running
2022-11-02 19:07:42 +01:00
5 changed files with 24 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
[![npm](https://img.shields.io/npm/v/kredits-contracts.svg)](https://www.npmjs.com/package/kredits-contracts)
[![npm](https://img.shields.io/npm/v/@kredits/contracts.svg)](https://www.npmjs.com/package/@kredits/contracts)
[![Build Status](https://drone.kosmos.org/api/badges/kredits/contracts/status.svg)](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)

View File

@@ -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',

View File

@@ -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
View File

@@ -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",

View File

@@ -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": {