Compare commits
71 Commits
feature/co
...
apm-hack
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d0abe9027 | |||
| 4fb8f1dc86 | |||
| 27e5190e29 | |||
| b9c171884b | |||
| 4d2e0ea84b | |||
| 26d12ba239 | |||
| 1aae62e139 | |||
| f21c4cf9de | |||
| 6778b9060f | |||
| 4d36f78824 | |||
| 98ecf28262 | |||
| f5564fa923 | |||
| 096a9f3cea | |||
| 3d24835908 | |||
| 8cbef8458d | |||
| 9ca0580db6 | |||
| dfe38e7d21 | |||
| 377560805f | |||
| 65d9cf2a06 | |||
| b35dc2049b | |||
| 26c2710149 | |||
| cc24c27444 | |||
| f717968402 | |||
| 14d7fbd75e | |||
| 7eb1fedb42 | |||
| cbfe39f804 | |||
| a0e4f5410d | |||
| 766463b57b | |||
| 93e0b30b35 | |||
| 6510dca4b1 | |||
| 551edcfa72 | |||
| d58e2d560a | |||
| 99394e7f14 | |||
| 8ceab08bfc | |||
| 896db5e047 | |||
| d507d7b562 | |||
| 40c5d2a275 | |||
| a049f2eedb | |||
| b68b037000 | |||
| 181e6f3c23 | |||
| 19556349f6 | |||
| a1a1c5ef9f | |||
| afbd114a36 | |||
| db312dafbf | |||
| e4c3d9a468 | |||
| 5b49f82544 | |||
| 6088f30cd8 | |||
| f1e2c65b9e | |||
| 786f38cfb7 | |||
| 197a31b9e1 | |||
| 20acfc70e3 | |||
| 732dfe7b29 | |||
| 3ce8f41d32 | |||
| e0ff29d1c9 | |||
| 0ce62839e9 | |||
| cc2c9a7368 | |||
| 1abfc5a265 | |||
| 6b9466c348 | |||
| 9fffdbfb58 | |||
| 350dadec4d | |||
| 70b9edbcac | |||
| 92da07dca2 | |||
| 6fed81c0ed | |||
| 74e61e1393 | |||
| 6351db3057 | |||
| ed3e5dd4c4 | |||
| bd39d0f126 | |||
| 4c8ee69664 | |||
| eae8967322 | |||
| 9984ca66ba | |||
| 1b09a30646 |
73
README.md
73
README.md
@@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
# Kredits Contracts
|
# Kredits Contracts
|
||||||
|
|
||||||
This repository contains the Solidity smart contracts organized as [Aragon](https://hack.aragon.org/)
|
This repository contains the Solidity smart contracts organized as
|
||||||
apps and JavaScript API wrapper for [Kosmos Kredits](https://wiki.kosmos.org/Kredits).
|
[Aragon](https://hack.aragon.org/) apps and JavaScript API wrapper for [Kosmos
|
||||||
|
Kredits](https://wiki.kosmos.org/Kredits).
|
||||||
|
|
||||||
It is based on [aragonOS](https://hack.aragon.org/docs/aragonos-intro.html) and
|
It is based on [aragonOS](https://hack.aragon.org/docs/aragonos-intro.html) and
|
||||||
follows the aragonOS conventions.
|
follows the aragonOS conventions. Aragon itself uses the [Truffle
|
||||||
Aragon itself uses the [Truffle framework](http://truffleframework.com/) for some things.
|
framework](http://truffleframework.com/) for some things.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
@@ -22,35 +23,36 @@ Each of the aragon apps are separate packages:
|
|||||||
$ cd apps/[app]
|
$ cd apps/[app]
|
||||||
$ npm install
|
$ npm install
|
||||||
|
|
||||||
or use the bootstrap command (see below)
|
You can use `npm run install-all` to install all app dependencies at once.
|
||||||
|
|
||||||
### Local development chain
|
### Local development chain
|
||||||
|
|
||||||
For local development it is recommended to use
|
For local development it is recommended to use
|
||||||
[ganache](http://truffleframework.com/ganache/) to run a local development
|
[ganache](http://truffleframework.com/ganache/) to run a local development
|
||||||
chain. Using the ganache simulator no full Ethereum node is required.
|
chain. Using the ganache simulator no full Ethereum node is required.
|
||||||
|
|
||||||
We use the default aragon-cli devchain command to confgure and run a local
|
We use the default aragon-cli devchain command to confgure and run a local
|
||||||
development ganache.
|
development ganache.
|
||||||
|
|
||||||
$ npm run devchain (or aragon devchain --port 7545)
|
$ npm run devchain (or aragon devchain --port 7545)
|
||||||
|
|
||||||
To clear/reset the chain use:
|
To clear/reset the chain use:
|
||||||
|
|
||||||
$ npm run devchain -- --reset (or aragon devchain --port 7545 --reset)
|
$ npm run devchain -- --reset (or aragon devchain --port 7545 --reset)
|
||||||
|
|
||||||
We default to port 7545 for development to not get in conflict with the default
|
We default to port 7545 for development to not get in conflict with the default
|
||||||
Ethereum RPC port.
|
Ethereum RPC port.
|
||||||
|
|
||||||
### Bootstrap
|
### Bootstrap
|
||||||
|
|
||||||
1. Run an Ethereum node and ipfs
|
1. Run an Ethereum node and ipfs
|
||||||
|
|
||||||
$ npm run devchain
|
$ npm run devchain
|
||||||
$ ipfs daemon
|
$ ipfs daemon
|
||||||
|
|
||||||
2. Deploy each app to the devchain
|
2. Deploy each app to the devchain
|
||||||
|
|
||||||
|
(make sure you've run `npm install` for every app - see installation)
|
||||||
$ npm run deploy:apps
|
$ npm run deploy:apps
|
||||||
|
|
||||||
3. Deploy a new KreditsKit and create a new DAO with the latest app versions
|
3. Deploy a new KreditsKit and create a new DAO with the latest app versions
|
||||||
@@ -58,23 +60,28 @@ Ethereum RPC port.
|
|||||||
$ npm run deploy:kit
|
$ npm run deploy:kit
|
||||||
$ npm run deploy:dao
|
$ npm run deploy:dao
|
||||||
|
|
||||||
4. Execute seeds to create demo contributors, contributons, etc. (optional)
|
4. Execute seeds to create demo contributors, contributons, 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`**
|
||||||
|
|
||||||
|
If you want to reset your local setup:
|
||||||
|
|
||||||
|
$ npm run reset // deploys a new kit and a new DAO
|
||||||
|
$ npm run reset:hard // deploys all apps and does reset
|
||||||
|
|
||||||
## Contract architecture
|
## Contract architecture
|
||||||
|
|
||||||
Contracts are organized in independent apps (see `/apps`) and are developed
|
Contracts are organized in independent apps (see `/apps`) and are developed and
|
||||||
and deployed independently. Each app has a version and can be "installed"
|
deployed independently. Each app has a version and can be "installed" on the
|
||||||
on the Kredits DAO independently.
|
Kredits DAO independently.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
A DAO can be deployed using the `scripts/deploy-kit.js` script or with the
|
A DAO can be deployed using the `scripts/deploy-kit.js` script or with the `npm
|
||||||
`npm run deploy:dao` command. This deploys a new Kredits DAO, installs
|
run deploy:dao` command. This deploys a new Kredits DAO, installs the latest
|
||||||
the latest app versions and sets the required permissions.
|
app versions and sets the required permissions.
|
||||||
|
|
||||||
See each app in `/apps/*` for details.
|
See each app in `/apps/*` for details.
|
||||||
|
|
||||||
@@ -87,6 +94,8 @@ CLI. _At some point these should be moved into a real nice CLI._
|
|||||||
To run these scripts use `truffle exec`. For example: `truffle exec
|
To run these scripts use `truffle exec`. For example: `truffle exec
|
||||||
scripts/add-proposal.js`.
|
scripts/add-proposal.js`.
|
||||||
|
|
||||||
|
Some scripts are also defined as npm script, see package.json.
|
||||||
|
|
||||||
### cli.js
|
### cli.js
|
||||||
|
|
||||||
Call any function on any contract:
|
Call any function on any contract:
|
||||||
@@ -154,7 +163,7 @@ Creates and configures a new DAO instance.
|
|||||||
or
|
or
|
||||||
$ npm run deploy:dao
|
$ npm run deploy:dao
|
||||||
|
|
||||||
KreditsKit address is load from `lib/addresses/KreditsKit.json` or can be
|
KreditsKit address is load from `lib/addresses/KreditsKit.json` or can be
|
||||||
configured through the `KREDITS_KIT` environment variable.
|
configured through the `KREDITS_KIT` environment variable.
|
||||||
|
|
||||||
### deploy-apps.sh
|
### deploy-apps.sh
|
||||||
@@ -165,14 +174,32 @@ Runs `npm install` for each app and publishes a new version.
|
|||||||
or
|
or
|
||||||
$ npm run deploy:apps
|
$ npm run deploy:apps
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
### Apps deployment
|
||||||
|
|
||||||
|
To deploy a new app version run:
|
||||||
|
|
||||||
|
$ aragon apm publish major --environment=NETWORK_TO_DEPLOY
|
||||||
|
|
||||||
|
### KreditsKit
|
||||||
|
|
||||||
|
deploy the KreditsKit as Kit to create new DAOs
|
||||||
|
|
||||||
|
$ truffle exec scripts/deploy-kit.js --network=NETWORK_TO_DEPLOY
|
||||||
|
|
||||||
|
### Creating a new DAO
|
||||||
|
|
||||||
|
make sure all apps and the KreditsKit are deployed, then create a new DAO:
|
||||||
|
|
||||||
|
$ truffle exec scripts/new-dao.js --network=NETWORK_TO_DEPLOY
|
||||||
|
|
||||||
## ACL / Permissions
|
## ACL / Permissions
|
||||||
|
|
||||||
|
|
||||||
## Upgradeable contracts
|
## Upgradeable contracts
|
||||||
|
|
||||||
We use aragonOS for upgradeablity of the different contracts.
|
We use aragonOS for upgradeablity of the different contracts. Refer to the
|
||||||
Refer to the [aragonOS upgradeablity documentation](https://hack.aragon.org/docs/upgradeability-intro)
|
[aragonOS upgradeablity documentation](https://hack.aragon.org/docs/upgradeability-intro)
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|||||||
@@ -4,7 +4,14 @@ import "@aragon/os/contracts/apps/AragonApp.sol";
|
|||||||
import "@aragon/os/contracts/kernel/IKernel.sol";
|
import "@aragon/os/contracts/kernel/IKernel.sol";
|
||||||
|
|
||||||
interface IToken {
|
interface IToken {
|
||||||
function mintFor(address contributorAccount, uint256 amount, uint256 contributionId) public;
|
function mintFor(address contributorAccount, uint256 amount, uint32 contributionId) public;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ContributorInterface {
|
||||||
|
function getContributorAddressById(uint32 contributorId) public view returns (address);
|
||||||
|
function getContributorIdByAddress(address contributorAccount) public view returns (uint32);
|
||||||
|
// TODO Maybe use for validation
|
||||||
|
// function exists(uint32 contributorId) public view returns (bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
contract Contribution is AragonApp {
|
contract Contribution is AragonApp {
|
||||||
@@ -12,47 +19,70 @@ contract Contribution is AragonApp {
|
|||||||
bytes32 public constant VETO_CONTRIBUTION_ROLE = keccak256("VETO_CONTRIBUTION_ROLE");
|
bytes32 public constant VETO_CONTRIBUTION_ROLE = keccak256("VETO_CONTRIBUTION_ROLE");
|
||||||
|
|
||||||
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
||||||
|
|
||||||
// ensure alphabetic order
|
// ensure alphabetic order
|
||||||
enum Apps { Contribution, Contributor, Proposal, Token }
|
enum Apps { Contribution, Contributor, Proposal, Token }
|
||||||
bytes32[4] public appIds;
|
bytes32[4] public appIds;
|
||||||
|
|
||||||
struct ContributionData {
|
struct ContributionData {
|
||||||
address contributor;
|
uint32 contributorId;
|
||||||
uint256 amount;
|
uint32 amount;
|
||||||
bool claimed;
|
bool claimed;
|
||||||
bytes32 hashDigest;
|
bytes32 hashDigest;
|
||||||
uint8 hashFunction;
|
uint8 hashFunction;
|
||||||
uint8 hashSize;
|
uint8 hashSize;
|
||||||
string tokenMetadataURL;
|
string tokenMetadataURL;
|
||||||
uint claimAfterBlock;
|
uint256 confirmedAtBlock;
|
||||||
bool vetoed;
|
bool vetoed;
|
||||||
bool exists;
|
bool exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
string internal name_;
|
string internal name_;
|
||||||
string internal symbol_;
|
string internal symbol_;
|
||||||
|
|
||||||
mapping(uint256 => address) contributionOwner;
|
// map contribution ID to contributor
|
||||||
mapping(address => uint256[]) ownedContributions;
|
mapping(uint32 => uint32) public contributionOwner;
|
||||||
|
// map contributor to contribution IDs
|
||||||
|
mapping(uint32 => uint32[]) public ownedContributions;
|
||||||
|
|
||||||
mapping(uint256 => ContributionData) public contributions;
|
mapping(uint32 => ContributionData) public contributions;
|
||||||
uint256 public contributionsCount;
|
uint32 public contributionsCount;
|
||||||
|
|
||||||
uint256 public blocksToWait = 0;
|
uint32 public blocksToWait;
|
||||||
|
|
||||||
event ContributionAdded(uint256 id, address indexed contributor, uint256 amount);
|
event ContributionAdded(uint32 id, uint32 indexed contributorId, uint32 amount);
|
||||||
event ContributionClaimed(uint256 id, address indexed contributor, uint256 amount);
|
event ContributionClaimed(uint32 id, uint32 indexed contributorId, uint32 amount);
|
||||||
event ContributionVetoed(uint256 id, address vetoedByAccount);
|
event ContributionVetoed(uint32 id, address vetoedByAccount);
|
||||||
|
|
||||||
function initialize(bytes32[4] _appIds) public onlyInit {
|
function initialize(bytes32[4] _appIds) public onlyInit {
|
||||||
appIds = _appIds;
|
appIds = _appIds;
|
||||||
|
blocksToWait = 40320; // 7 days; 15 seconds block time
|
||||||
initialized();
|
initialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO refactor into a single function
|
||||||
function getTokenContract() public view returns (address) {
|
function getTokenContract() public view returns (address) {
|
||||||
IKernel k = IKernel(kernel());
|
IKernel k = IKernel(kernel());
|
||||||
|
|
||||||
return k.getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Token)]);
|
return k.getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Token)]);
|
||||||
}
|
}
|
||||||
|
function getContributorContract() public view returns (address) {
|
||||||
|
IKernel k = IKernel(kernel());
|
||||||
|
return k.getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Contributor)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getContributorIdByAddress(address contributorAccount) public view returns (uint32) {
|
||||||
|
address contributor = getContributorContract();
|
||||||
|
return ContributorInterface(contributor).getContributorIdByAddress(contributorAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getContributorAddressById(uint32 contributorId) public view returns (address) {
|
||||||
|
address contributor = getContributorContract();
|
||||||
|
return ContributorInterface(contributor).getContributorAddressById(contributorId);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Token standard functions (ERC 721)
|
||||||
|
//
|
||||||
|
|
||||||
function name() external view returns (string) {
|
function name() external view returns (string) {
|
||||||
return name_;
|
return name_;
|
||||||
@@ -62,85 +92,100 @@ contract Contribution is AragonApp {
|
|||||||
return symbol_;
|
return symbol_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Balance is amount of ERC271 tokens, not amount of kredits
|
||||||
function balanceOf(address owner) public view returns (uint256) {
|
function balanceOf(address owner) public view returns (uint256) {
|
||||||
require(owner != address(0));
|
require(owner != address(0));
|
||||||
return ownedContributions[owner].length;
|
uint32 contributorId = getContributorIdByAddress(owner);
|
||||||
|
return ownedContributions[contributorId].length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ownerOf(uint256 contributionId) public view returns (address) {
|
function ownerOf(uint32 contributionId) public view returns (address) {
|
||||||
require(exists(contributionId));
|
require(exists(contributionId));
|
||||||
return contributions[contributionId].contributor;
|
uint32 contributorId = contributions[contributionId].contributorId;
|
||||||
|
return getContributorAddressById(contributorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tokenOfOwnerByIndex(address contributor, uint256 index) public view returns (uint256) {
|
function tokenOfOwnerByIndex(address owner, uint32 index) public view returns (uint32) {
|
||||||
return ownedContributions[contributor][index];
|
uint32 contributorId = getContributorIdByAddress(owner);
|
||||||
|
return ownedContributions[contributorId][index];
|
||||||
}
|
}
|
||||||
|
|
||||||
function tokenMetadata(uint256 contributionId) public view returns (string) {
|
function tokenMetadata(uint32 contributionId) public view returns (string) {
|
||||||
return contributions[contributionId].tokenMetadataURL;
|
return contributions[contributionId].tokenMetadataURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContribution(uint256 contributionId) public view returns (uint256 id, address contributor, uint256 amount, bool claimed, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint claimAfterBlock, bool exists, bool vetoed) {
|
//
|
||||||
|
// Custom functions
|
||||||
|
//
|
||||||
|
|
||||||
|
function getContribution(uint32 contributionId) public view returns (uint32 id, uint32 contributorId, uint32 amount, bool claimed, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256 confirmedAtBlock, bool exists, bool vetoed) {
|
||||||
id = contributionId;
|
id = contributionId;
|
||||||
ContributionData storage c = contributions[id];
|
ContributionData storage c = contributions[id];
|
||||||
return (
|
return (
|
||||||
id,
|
id,
|
||||||
c.contributor,
|
c.contributorId,
|
||||||
c.amount,
|
c.amount,
|
||||||
c.claimed,
|
c.claimed,
|
||||||
c.hashDigest,
|
c.hashDigest,
|
||||||
c.hashFunction,
|
c.hashFunction,
|
||||||
c.hashSize,
|
c.hashSize,
|
||||||
c.claimAfterBlock,
|
c.confirmedAtBlock,
|
||||||
c.exists,
|
c.exists,
|
||||||
c.vetoed
|
c.vetoed
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function add(uint256 amount, address contributorAccount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_CONTRIBUTION_ROLE) {
|
function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_CONTRIBUTION_ROLE) {
|
||||||
//require(canPerform(msg.sender, ADD_CONTRIBUTION_ROLE, new uint256[](0)), 'nope');
|
//require(canPerform(msg.sender, ADD_CONTRIBUTION_ROLE, new uint32[](0)), 'nope');
|
||||||
uint256 contributionId = contributionsCount + 1;
|
uint32 contributionId = contributionsCount + 1;
|
||||||
ContributionData storage c = contributions[contributionId];
|
ContributionData storage c = contributions[contributionId];
|
||||||
c.exists = true;
|
c.exists = true;
|
||||||
c.amount = amount;
|
c.amount = amount;
|
||||||
c.claimed = false;
|
c.claimed = false;
|
||||||
c.contributor = contributorAccount;
|
c.contributorId = contributorId;
|
||||||
c.hashDigest = hashDigest;
|
c.hashDigest = hashDigest;
|
||||||
c.hashFunction = hashFunction;
|
c.hashFunction = hashFunction;
|
||||||
c.hashSize = hashSize;
|
c.hashSize = hashSize;
|
||||||
c.claimAfterBlock = block.number; // + blocksToWait;
|
if (contributionId < 10) {
|
||||||
|
c.confirmedAtBlock = block.number;
|
||||||
|
} else {
|
||||||
|
c.confirmedAtBlock = block.number + blocksToWait;
|
||||||
|
}
|
||||||
|
|
||||||
contributionsCount++;
|
contributionsCount++;
|
||||||
|
|
||||||
contributionOwner[contributionId] = contributorAccount;
|
contributionOwner[contributionId] = contributorId;
|
||||||
ownedContributions[contributorAccount].push(contributionId);
|
ownedContributions[contributorId].push(contributionId);
|
||||||
|
|
||||||
emit ContributionAdded(contributionId, contributorAccount, amount);
|
emit ContributionAdded(contributionId, contributorId, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function veto(uint256 contributionId) public isInitialized auth(VETO_CONTRIBUTION_ROLE) {
|
function veto(uint32 contributionId) public isInitialized auth(VETO_CONTRIBUTION_ROLE) {
|
||||||
ContributionData storage c = contributions[contributionId];
|
ContributionData storage c = contributions[contributionId];
|
||||||
require(c.exists, 'NOT_FOUND');
|
require(c.exists, 'NOT_FOUND');
|
||||||
require(!c.claimed, 'ALREADY_CLAIMED');
|
require(!c.claimed, 'ALREADY_CLAIMED');
|
||||||
|
require(block.number < c.confirmedAtBlock, 'VETO_PERIOD_ENDED');
|
||||||
c.vetoed = true;
|
c.vetoed = true;
|
||||||
|
|
||||||
emit ContributionVetoed(contributionId, msg.sender);
|
emit ContributionVetoed(contributionId, msg.sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
function claim(uint256 contributionId) public isInitialized {
|
function claim(uint32 contributionId) public isInitialized {
|
||||||
ContributionData storage c = contributions[contributionId];
|
ContributionData storage c = contributions[contributionId];
|
||||||
require(c.exists, 'NOT_FOUND');
|
require(c.exists, 'NOT_FOUND');
|
||||||
require(!c.claimed, 'ALREADY_CLAIMED');
|
require(!c.claimed, 'ALREADY_CLAIMED');
|
||||||
require(!c.vetoed, 'VETOED');
|
require(!c.vetoed, 'VETOED');
|
||||||
require(block.number > c.claimAfterBlock, 'NOT_CLAIMABLE');
|
require(block.number >= c.confirmedAtBlock, 'NOT_CLAIMABLE');
|
||||||
|
|
||||||
c.claimed = true;
|
c.claimed = true;
|
||||||
address token = getTokenContract();
|
address token = getTokenContract();
|
||||||
IToken(token).mintFor(c.contributor, c.amount, contributionId);
|
address contributorAccount = getContributorAddressById(c.contributorId);
|
||||||
emit ContributionClaimed(contributionId, c.contributor, c.amount);
|
uint256 amount = uint256(c.amount);
|
||||||
|
IToken(token).mintFor(contributorAccount, amount, contributionId);
|
||||||
|
emit ContributionClaimed(contributionId, c.contributorId, c.amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function exists(uint256 contributionId) view public returns (bool) {
|
function exists(uint32 contributionId) view public returns (bool) {
|
||||||
return contributions[contributionId].exists;
|
return contributions[contributionId].exists;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,41 +6,32 @@ import "@aragon/os/contracts/kernel/IKernel.sol";
|
|||||||
interface ITokenBalance {
|
interface ITokenBalance {
|
||||||
function balanceOf(address contributorAccount) public view returns (uint256);
|
function balanceOf(address contributorAccount) public view returns (uint256);
|
||||||
}
|
}
|
||||||
|
|
||||||
contract Contributor is AragonApp {
|
contract Contributor is AragonApp {
|
||||||
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
||||||
|
|
||||||
bytes32 public constant MANAGE_CONTRIBUTORS_ROLE = keccak256("MANAGE_CONTRIBUTORS_ROLE");
|
bytes32 public constant MANAGE_CONTRIBUTORS_ROLE = keccak256("MANAGE_CONTRIBUTORS_ROLE");
|
||||||
|
|
||||||
struct Contributor {
|
struct Contributor {
|
||||||
address account;
|
address account;
|
||||||
bytes32 ipfsHash;
|
bytes32 hashDigest;
|
||||||
uint8 hashFunction;
|
uint8 hashFunction;
|
||||||
uint8 hashSize;
|
uint8 hashSize;
|
||||||
bool isCore;
|
|
||||||
bool exists;
|
bool exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapping (address => uint) public contributorIds;
|
mapping (address => uint32) public contributorIds;
|
||||||
mapping (uint => Contributor) public contributors;
|
mapping (uint32 => Contributor) public contributors;
|
||||||
uint256 public contributorsCount;
|
uint32 public contributorsCount;
|
||||||
|
|
||||||
// ensure alphabetic order
|
// ensure alphabetic order
|
||||||
enum Apps { Contribution, Contributor, Proposal, Token }
|
enum Apps { Contribution, Contributor, Proposal, Token }
|
||||||
bytes32[4] public appIds;
|
bytes32[4] public appIds;
|
||||||
|
|
||||||
event ContributorProfileUpdated(uint id, bytes32 oldIpfsHash, bytes32 newIpfsHash);
|
event ContributorProfileUpdated(uint32 id, bytes32 oldHashDigest, bytes32 newHashDigest); // what should be logged
|
||||||
event ContributorAccountUpdated(uint id, address oldAccount, address newAccount);
|
event ContributorAccountUpdated(uint32 id, address oldAccount, address newAccount);
|
||||||
event ContributorAdded(uint id, address account);
|
event ContributorAdded(uint32 id, address account);
|
||||||
|
|
||||||
function initialize(address root,bytes32[4] _appIds) public onlyInit {
|
function initialize(address root,bytes32[4] _appIds) public onlyInit {
|
||||||
uint _id = contributorsCount + 1;
|
|
||||||
Contributor storage c = contributors[_id];
|
|
||||||
c.exists = true;
|
|
||||||
c.isCore = true;
|
|
||||||
c.account = root;
|
|
||||||
contributorIds[root] = _id;
|
|
||||||
contributorsCount += 1;
|
|
||||||
|
|
||||||
appIds = _appIds;
|
appIds = _appIds;
|
||||||
|
|
||||||
initialized();
|
initialized();
|
||||||
@@ -52,41 +43,40 @@ contract Contributor is AragonApp {
|
|||||||
return k.getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Token)]);
|
return k.getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Token)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function coreContributorsCount() view public returns (uint) {
|
function coreContributorsCount() view public returns (uint32) {
|
||||||
uint count = 0;
|
uint32 count = 0;
|
||||||
for (uint256 i = 1; i <= contributorsCount; i++) {
|
for (uint32 i = 1; i <= contributorsCount; i++) {
|
||||||
if (contributors[i].isCore) {
|
if (isCoreTeam(i)) {
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateContributorAccount(uint id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) {
|
function updateContributorAccount(uint32 id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) {
|
||||||
contributorIds[oldAccount] = 0;
|
contributorIds[oldAccount] = 0;
|
||||||
contributorIds[newAccount] = id;
|
contributorIds[newAccount] = id;
|
||||||
contributors[id].account = newAccount;
|
contributors[id].account = newAccount;
|
||||||
ContributorAccountUpdated(id, oldAccount, newAccount);
|
ContributorAccountUpdated(id, oldAccount, newAccount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateContributorIpfsHash(uint id, bytes32 ipfsHash, uint8 hashFunction, uint8 hashSize) public isInitialized auth(MANAGE_CONTRIBUTORS_ROLE) {
|
function updateContributorProfileHash(uint32 id, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(MANAGE_CONTRIBUTORS_ROLE) {
|
||||||
Contributor storage c = contributors[id];
|
Contributor storage c = contributors[id];
|
||||||
bytes32 oldIpfsHash = c.ipfsHash;
|
bytes32 oldHashDigest = c.hashDigest;
|
||||||
c.ipfsHash = ipfsHash;
|
c.hashDigest = hashDigest;
|
||||||
c.hashFunction = hashFunction;
|
c.hashFunction = hashFunction;
|
||||||
c.hashSize = hashSize;
|
c.hashSize = hashSize;
|
||||||
|
|
||||||
ContributorProfileUpdated(id, oldIpfsHash, c.ipfsHash);
|
ContributorProfileUpdated(id, oldHashDigest, c.hashDigest);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addContributor(address account, bytes32 ipfsHash, uint8 hashFunction, uint8 hashSize, bool isCore) public isInitialized auth(MANAGE_CONTRIBUTORS_ROLE) {
|
function addContributor(address account, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(MANAGE_CONTRIBUTORS_ROLE) {
|
||||||
require(!addressExists(account));
|
require(!addressExists(account));
|
||||||
uint _id = contributorsCount + 1;
|
uint32 _id = contributorsCount + 1;
|
||||||
assert(!contributors[_id].exists); // this can not be acually
|
assert(!contributors[_id].exists); // this can not be acually
|
||||||
Contributor storage c = contributors[_id];
|
Contributor storage c = contributors[_id];
|
||||||
c.exists = true;
|
c.exists = true;
|
||||||
c.isCore = isCore;
|
c.hashDigest = hashDigest;
|
||||||
c.ipfsHash = ipfsHash;
|
|
||||||
c.hashFunction = hashFunction;
|
c.hashFunction = hashFunction;
|
||||||
c.hashSize = hashSize;
|
c.hashSize = hashSize;
|
||||||
c.account = account;
|
c.account = account;
|
||||||
@@ -96,49 +86,61 @@ contract Contributor is AragonApp {
|
|||||||
emit ContributorAdded(_id, account);
|
emit ContributorAdded(_id, account);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCore(uint id) view public returns (bool) {
|
function isCoreTeam(uint32 id) view public returns (bool) {
|
||||||
return contributors[id].isCore;
|
// TODO: for simplicity we simply define the first contributors as core
|
||||||
|
// later this needs to be changed to something more dynamic
|
||||||
|
return id < 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
function exists(uint id) view public returns (bool) {
|
function exists(uint32 id) view public returns (bool) {
|
||||||
return contributors[id].exists;
|
return contributors[id].exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addressIsCore(address account) view public returns (bool) {
|
function addressIsCore(address account) view public returns (bool) {
|
||||||
return getContributorByAddress(account).isCore;
|
uint32 id = getContributorIdByAddress(account);
|
||||||
|
return isCoreTeam(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addressExists(address account) view public returns (bool) {
|
function addressExists(address account) view public returns (bool) {
|
||||||
return getContributorByAddress(account).exists;
|
return getContributorByAddress(account).exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContributorIdByAddress(address account) view public returns (uint) {
|
function getContributorIdByAddress(address account) view public returns (uint32) {
|
||||||
return contributorIds[account];
|
return contributorIds[account];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContributorAddressById(uint id) view public returns (address) {
|
function getContributorAddressById(uint32 id) view public returns (address) {
|
||||||
return contributors[id].account;
|
return contributors[id].account;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContributorByAddress(address account) internal view returns (Contributor) {
|
function getContributorByAddress(address account) internal view returns (Contributor) {
|
||||||
uint id = contributorIds[account];
|
uint32 id = contributorIds[account];
|
||||||
return contributors[id];
|
return contributors[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContributorById(uint _id) public view returns (uint id, address account, bytes32 ipfsHash, uint8 hashFunction, uint8 hashSize, bool isCore, uint256 balance, bool exists ) {
|
function getContributorById(uint32 _id) public view returns (uint32 id, address account, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, bool isCore, uint256 balance, bool exists ) {
|
||||||
id = _id;
|
id = _id;
|
||||||
Contributor storage c = contributors[_id];
|
Contributor storage c = contributors[_id];
|
||||||
account = c.account;
|
account = c.account;
|
||||||
ipfsHash = c.ipfsHash;
|
hashDigest = c.hashDigest;
|
||||||
hashFunction = c.hashFunction;
|
hashFunction = c.hashFunction;
|
||||||
hashSize = c.hashSize;
|
hashSize = c.hashSize;
|
||||||
isCore = c.isCore;
|
isCore = isCoreTeam(id);
|
||||||
address token = getTokenContract();
|
address token = getTokenContract();
|
||||||
balance = ITokenBalance(token).balanceOf(c.account);
|
balance = ITokenBalance(token).balanceOf(c.account);
|
||||||
exists = c.exists;
|
exists = c.exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
function canPerform(address _who, address _where, bytes32 _what, uint256[] _how) public view returns (bool) {
|
function canPerform(address _who, address _where, bytes32 _what/*, uint256[] memory _how*/) public returns (bool) {
|
||||||
return addressExists(_who);
|
address sender = _who;
|
||||||
|
if (sender == address(-1)) {
|
||||||
|
sender = tx.origin;
|
||||||
|
}
|
||||||
|
// _what == keccak256('VOTE_PROPOSAL_ROLE')
|
||||||
|
if (_what == 0xd61216798314d2fc33e42ff2021d66707b1e38517d3f7166798a9d3a196a9c96) {
|
||||||
|
return contributorIds[sender] != uint256(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return addressIsCore(sender);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import "@aragon/os/contracts/apps/AragonApp.sol";
|
|||||||
import "@aragon/os/contracts/kernel/IKernel.sol";
|
import "@aragon/os/contracts/kernel/IKernel.sol";
|
||||||
|
|
||||||
interface IContributor {
|
interface IContributor {
|
||||||
function getContributorAddressById(uint256 contributorId) public view returns (address);
|
function getContributorAddressById(uint32 contributorId) public view returns (address);
|
||||||
function getContributorIdByAddress(address contributorAccount) public view returns (uint256);
|
function getContributorIdByAddress(address contributorAccount) public view returns (uint32);
|
||||||
function exists(uint256 contributorId) public view returns (bool);
|
function exists(uint32 contributorId) public view returns (bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IContribution {
|
interface IContribution {
|
||||||
function add(uint256 amount, address contributor, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public;
|
function add(uint32 amount, uint32 contributorId, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public;
|
||||||
}
|
}
|
||||||
|
|
||||||
contract Proposal is AragonApp {
|
contract Proposal is AragonApp {
|
||||||
@@ -25,26 +25,26 @@ contract Proposal is AragonApp {
|
|||||||
|
|
||||||
struct Proposal {
|
struct Proposal {
|
||||||
address creatorAccount;
|
address creatorAccount;
|
||||||
uint contributorId;
|
uint32 contributorId;
|
||||||
uint votesCount;
|
uint16 votesCount;
|
||||||
uint votesNeeded;
|
uint16 votesNeeded;
|
||||||
uint256 amount;
|
uint32 amount;
|
||||||
bool executed;
|
bool executed;
|
||||||
bytes32 hashDigest;
|
bytes32 hashDigest;
|
||||||
uint8 hashFunction;
|
uint8 hashFunction;
|
||||||
uint8 hashSize;
|
uint8 hashSize;
|
||||||
uint256[] voterIds;
|
uint32[] voterIds;
|
||||||
mapping (uint256 => bool) votes;
|
mapping (uint32 => bool) votes;
|
||||||
bool exists;
|
bool exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
mapping(uint256 => Proposal) public proposals;
|
mapping(uint32 => Proposal) public proposals;
|
||||||
uint256 public proposalsCount;
|
uint32 public proposalsCount;
|
||||||
|
|
||||||
event ProposalCreated(uint256 id, address creatorAccount, uint256 contributorId, uint256 amount);
|
event ProposalCreated(uint32 id, address creatorAccount, uint32 contributorId, uint32 amount);
|
||||||
|
|
||||||
event ProposalVoted(uint256 id, uint256 voterId, uint256 totalVotes);
|
event ProposalVoted(uint32 id, uint32 voterId, uint16 totalVotes);
|
||||||
event ProposalExecuted(uint256 id, uint256 contributorId, uint256 amount);
|
event ProposalExecuted(uint32 id, uint32 contributorId, uint32 amount);
|
||||||
|
|
||||||
function initialize(bytes32[4] _appIds) public onlyInit {
|
function initialize(bytes32[4] _appIds) public onlyInit {
|
||||||
appIds = _appIds;
|
appIds = _appIds;
|
||||||
@@ -59,11 +59,11 @@ contract Proposal is AragonApp {
|
|||||||
return IKernel(kernel()).getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Contribution)]);
|
return IKernel(kernel()).getApp(KERNEL_APP_ADDR_NAMESPACE, appIds[uint8(Apps.Contribution)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addProposal(uint contributorId, uint256 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_PROPOSAL_ROLE) {
|
function addProposal(uint32 contributorId, uint32 amount, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize) public isInitialized auth(ADD_PROPOSAL_ROLE) {
|
||||||
require(IContributor(getContributorContract()).exists(contributorId), 'CONTRIBUTOR_NOT_FOUND');
|
require(IContributor(getContributorContract()).exists(contributorId), 'CONTRIBUTOR_NOT_FOUND');
|
||||||
|
|
||||||
uint256 proposalId = proposalsCount + 1;
|
uint32 proposalId = proposalsCount + 1;
|
||||||
uint256 _votesNeeded = 1; //contributorsContract().coreContributorsCount() / 100 * 75;
|
uint16 _votesNeeded = 1; //contributorsContract().coreContributorsCount() / 100 * 75;
|
||||||
|
|
||||||
Proposal storage p = proposals[proposalId];
|
Proposal storage p = proposals[proposalId];
|
||||||
p.creatorAccount = msg.sender;
|
p.creatorAccount = msg.sender;
|
||||||
@@ -75,23 +75,23 @@ contract Proposal is AragonApp {
|
|||||||
p.votesCount = 0;
|
p.votesCount = 0;
|
||||||
p.votesNeeded = _votesNeeded;
|
p.votesNeeded = _votesNeeded;
|
||||||
p.exists = true;
|
p.exists = true;
|
||||||
|
|
||||||
proposalsCount++;
|
proposalsCount++;
|
||||||
emit ProposalCreated(proposalId, msg.sender, p.contributorId, p.amount);
|
emit ProposalCreated(proposalId, msg.sender, p.contributorId, p.amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProposal(uint proposalId) public view returns (uint256 id, address creatorAccount, uint256 contributorId, uint256 votesCount, uint256 votesNeeded, uint256 amount, bool executed, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint256[] voterIds, bool exists) {
|
function getProposal(uint32 proposalId) public view returns (uint32 id, address creatorAccount, uint32 contributorId, uint16 votesCount, uint16 votesNeeded, uint32 amount, bool executed, bytes32 hashDigest, uint8 hashFunction, uint8 hashSize, uint32[] voterIds, bool exists) {
|
||||||
id = proposalId;
|
id = proposalId;
|
||||||
Proposal storage p = proposals[id];
|
Proposal storage p = proposals[id];
|
||||||
return (
|
return (
|
||||||
id,
|
id,
|
||||||
p.creatorAccount,
|
p.creatorAccount,
|
||||||
p.contributorId,
|
p.contributorId,
|
||||||
p.votesCount,
|
p.votesCount,
|
||||||
p.votesNeeded,
|
p.votesNeeded,
|
||||||
p.amount,
|
p.amount,
|
||||||
p.executed,
|
p.executed,
|
||||||
p.hashDigest,
|
p.hashDigest,
|
||||||
p.hashFunction,
|
p.hashFunction,
|
||||||
p.hashSize,
|
p.hashSize,
|
||||||
p.voterIds,
|
p.voterIds,
|
||||||
@@ -99,10 +99,10 @@ contract Proposal is AragonApp {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function vote(uint256 proposalId) public isInitialized auth(VOTE_PROPOSAL_ROLE) {
|
function vote(uint32 proposalId) public isInitialized auth(VOTE_PROPOSAL_ROLE) {
|
||||||
Proposal storage p = proposals[proposalId];
|
Proposal storage p = proposals[proposalId];
|
||||||
require(!p.executed, 'ALREADY_EXECUTED');
|
require(!p.executed, 'ALREADY_EXECUTED');
|
||||||
uint256 voterId = IContributor(getContributorContract()).getContributorIdByAddress(msg.sender);
|
uint32 voterId = IContributor(getContributorContract()).getContributorIdByAddress(msg.sender);
|
||||||
require(p.votes[voterId] != true, 'ALREADY_VOTED');
|
require(p.votes[voterId] != true, 'ALREADY_VOTED');
|
||||||
p.voterIds.push(voterId);
|
p.voterIds.push(voterId);
|
||||||
p.votes[voterId] = true;
|
p.votes[voterId] = true;
|
||||||
@@ -114,20 +114,19 @@ contract Proposal is AragonApp {
|
|||||||
emit ProposalVoted(proposalId, voterId, p.votesCount);
|
emit ProposalVoted(proposalId, voterId, p.votesCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function batchVote(uint256[] _proposalIds) public isInitialized auth(VOTE_PROPOSAL_ROLE) {
|
function batchVote(uint32[] _proposalIds) public isInitialized auth(VOTE_PROPOSAL_ROLE) {
|
||||||
for (uint256 i = 0; i < _proposalIds.length; i++) {
|
for (uint32 i = 0; i < _proposalIds.length; i++) {
|
||||||
vote(_proposalIds[i]);
|
vote(_proposalIds[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function executeProposal(uint proposalId) private {
|
function executeProposal(uint32 proposalId) private {
|
||||||
Proposal storage p = proposals[proposalId];
|
Proposal storage p = proposals[proposalId];
|
||||||
require(!p.executed, 'ALREADY_EXECUTED');
|
require(!p.executed, 'ALREADY_EXECUTED');
|
||||||
require(p.votesCount >= p.votesNeeded, 'MISSING_VOTES');
|
require(p.votesCount >= p.votesNeeded, 'MISSING_VOTES');
|
||||||
|
|
||||||
p.executed = true;
|
p.executed = true;
|
||||||
address contributorAccount = IContributor(getContributorContract()).getContributorAddressById(p.contributorId);
|
IContribution(getContributionContract()).add(p.amount, p.contributorId, p.hashDigest, p.hashFunction, p.hashSize);
|
||||||
IContribution(getContributionContract()).add(p.amount, contributorAccount, p.hashDigest, p.hashFunction, p.hashSize);
|
|
||||||
emit ProposalExecuted(proposalId, p.contributorId, p.amount);
|
emit ProposalExecuted(proposalId, p.contributorId, p.amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,16 +9,20 @@ contract Token is ERC20Token, AragonApp {
|
|||||||
// ensure alphabetic order
|
// ensure alphabetic order
|
||||||
enum Apps { Contribution, Contributor, Proposal, Token }
|
enum Apps { Contribution, Contributor, Proposal, Token }
|
||||||
bytes32[4] public appIds;
|
bytes32[4] public appIds;
|
||||||
|
|
||||||
event LogMint(address indexed recipient, uint256 amount, uint256 contributionId);
|
event LogMint(address indexed recipient, uint256 amount, uint32 contributionId);
|
||||||
|
|
||||||
function initialize(bytes32[4] _appIds) public onlyInit {
|
function initialize(bytes32[4] _appIds) public onlyInit {
|
||||||
appIds = _appIds;
|
appIds = _appIds;
|
||||||
|
name = 'Kredits';
|
||||||
|
symbol = '₭S';
|
||||||
|
decimals = 18;
|
||||||
initialized();
|
initialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
function mintFor(address contributorAccount, uint256 amount, uint256 contributionId) public isInitialized auth(MINT_TOKEN_ROLE) {
|
function mintFor(address contributorAccount, uint256 amount, uint32 contributionId) public isInitialized auth(MINT_TOKEN_ROLE) {
|
||||||
_mint(contributorAccount, amount);
|
uint256 amountInWei = amount.mul(1 ether);
|
||||||
|
_mint(contributorAccount, amountInWei);
|
||||||
emit LogMint(contributorAccount, amount, contributionId);
|
emit LogMint(contributorAccount, amount, contributionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
let contractCalls = [
|
const contractCalls = [
|
||||||
['Contributor', 'add', [{ account: '0x7e8f313c56f809188313aa274fa67ee58c31515d', name: 'bumi', isCore: true, kind: 'preson', url: '', github_username: 'bumi', github_uid: 318, wiki_username: 'bumi' }, {gasLimit: 200000}]],
|
['Contributor', 'add', [{ account: '0x7e8f313c56f809188313aa274fa67ee58c31515d', name: 'bumi', isCore: true, kind: 'person', url: '', github_username: 'bumi', github_uid: 318, wiki_username: 'bumi' }, { gasLimit: 200000 }]],
|
||||||
['Contributor', 'add', [{ account: '0xa502eb4021f3b9ab62f75b57a94e1cfbf81fd827', name: 'raucau', isCore: true, kind: 'person', url: '', github_username: 'skddc', github_uid: 842, wiki_username: 'raucau' }, {gasLimit: 200000}]],
|
['Contributor', 'add', [{ account: '0x49575f3DD9a0d60aE661BC992f72D837A77f05Bc', name: 'raucao', isCore: true, kind: 'person', url: '', github_username: 'skddc', github_uid: 842, wiki_username: 'raucau' }, { gasLimit: 200000 }]],
|
||||||
['Proposal', 'addProposal', [{ contributorId: 2, amount: 42, kind: 'code', description: 'runs the seeds', url: '' }, {gasLimit: 350000}]],
|
['Proposal', 'addProposal', [{ contributorId: 1, amount: 500, kind: 'code', description: '[67P/kredits-contracts] Ran the seeds', url: '' }, { gasLimit: 350000 }]],
|
||||||
['Proposal', 'addProposal', [{ contributorId: 3, amount: 23, kind: 'code', description: 'runs the seeds', url: '' }, {gasLimit: 350000}]],
|
['Proposal', 'addProposal', [{ contributorId: 2, amount: 500, kind: 'code', description: '[67P/kredits-contracts] Ran the seeds', url: '' }, { gasLimit: 350000 }]],
|
||||||
['Proposal', 'addProposal', [{contributorId: 3, amount: 100, kind: 'code', description: 'hacks on kredits', url: '' }, {gasLimit: 350000}]],
|
['Proposal', 'addProposal', [{ contributorId: 2, amount: 500, kind: 'code', description: '[67P/kredits-contracts] Hacked on kredits', url: '' }, { gasLimit: 350000 }]],
|
||||||
['Proposal', 'vote', [1, {gasLimit: 550000}]],
|
['Proposal', 'vote', [1, { gasLimit: 550000 }]],
|
||||||
['Contribution', 'addContribution', [{contributorAccount: '0xa502eb4021f3b9ab62f75b57a94e1cfbf81fd827', amount: 100, kind: 'code', description: 'hacks on kredits', url: '' }, {gasLimit: 350000}]],
|
['Contribution', 'addContribution', [{ contributorId: 1, amount: 5000, kind: 'dev', description: '[67P/kredits-contracts] Introduce contribution token', url: '' }, { gasLimit: 350000 }]],
|
||||||
|
['Contribution', 'addContribution', [{ contributorId: 2, amount: 1500, kind: 'dev', description: '[67P/kredits-web] Reviewed stuff', url: '' }, { gasLimit: 350000 }]],
|
||||||
|
['Contribution', 'claim', [1, { gasLimit: 300000 }]]
|
||||||
];
|
];
|
||||||
let funds = [
|
const funds = [
|
||||||
'0x7e8f313c56f809188313aa274fa67ee58c31515d',
|
'0x7e8f313c56f809188313aa274fa67ee58c31515d',
|
||||||
'0xa502eb4021f3b9ab62f75b57a94e1cfbf81fd827'
|
'0xa502eb4021f3b9ab62f75b57a94e1cfbf81fd827'
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ contract KreditsKit is KitBase {
|
|||||||
|
|
||||||
Contributor contributor = Contributor(_installApp(dao, appIds[uint8(Apps.Contributor)]));
|
Contributor contributor = Contributor(_installApp(dao, appIds[uint8(Apps.Contributor)]));
|
||||||
contributor.initialize(root, appIds);
|
contributor.initialize(root, appIds);
|
||||||
acl.createPermission(root, contributor, contributor.MANAGE_CONTRIBUTORS_ROLE(), root);
|
acl.createPermission(root, contributor, contributor.MANAGE_CONTRIBUTORS_ROLE(), this);
|
||||||
|
|
||||||
Token token = Token(_installApp(dao, appIds[uint8(Apps.Token)]));
|
Token token = Token(_installApp(dao, appIds[uint8(Apps.Token)]));
|
||||||
token.initialize(appIds);
|
token.initialize(appIds);
|
||||||
@@ -50,20 +50,23 @@ contract KreditsKit is KitBase {
|
|||||||
|
|
||||||
uint256[] memory params = new uint256[](1);
|
uint256[] memory params = new uint256[](1);
|
||||||
params[0] = uint256(203) << 248 | uint256(1) << 240 | uint240(contributor);
|
params[0] = uint256(203) << 248 | uint256(1) << 240 | uint240(contributor);
|
||||||
acl.grantPermissionP(root, contribution, contribution.ADD_CONTRIBUTION_ROLE(), params);
|
acl.grantPermissionP(acl.ANY_ENTITY(), contribution, contribution.ADD_CONTRIBUTION_ROLE(), params);
|
||||||
acl.grantPermissionP(root, contribution, contribution.VETO_CONTRIBUTION_ROLE(), params);
|
acl.grantPermissionP(acl.ANY_ENTITY(), contribution, contribution.VETO_CONTRIBUTION_ROLE(), params);
|
||||||
|
acl.grantPermissionP(acl.ANY_ENTITY(), contributor, contributor.MANAGE_CONTRIBUTORS_ROLE(), params);
|
||||||
|
|
||||||
//acl.setPermissionManager(this, proposal, proposal.VOTE_PROPOSAL_ROLE();
|
//acl.setPermissionManager(this, proposal, proposal.VOTE_PROPOSAL_ROLE();
|
||||||
acl.createPermission(root, proposal, proposal.VOTE_PROPOSAL_ROLE(), this);
|
acl.createPermission(root, proposal, proposal.VOTE_PROPOSAL_ROLE(), this);
|
||||||
acl.grantPermissionP(root, proposal, proposal.VOTE_PROPOSAL_ROLE(), params);
|
acl.grantPermissionP(acl.ANY_ENTITY(), proposal, proposal.VOTE_PROPOSAL_ROLE(), params);
|
||||||
|
|
||||||
acl.createPermission(root, proposal, proposal.ADD_PROPOSAL_ROLE(), this);
|
acl.createPermission(root, proposal, proposal.ADD_PROPOSAL_ROLE(), this);
|
||||||
acl.grantPermissionP(root, proposal, proposal.ADD_PROPOSAL_ROLE(), params);
|
//acl.grantPermissionP(address(-1), proposal, proposal.ADD_PROPOSAL_ROLE(), params);
|
||||||
|
acl.grantPermission(acl.ANY_ENTITY(), proposal, proposal.ADD_PROPOSAL_ROLE());
|
||||||
|
|
||||||
acl.setPermissionManager(root, proposal, proposal.VOTE_PROPOSAL_ROLE());
|
acl.setPermissionManager(root, proposal, proposal.VOTE_PROPOSAL_ROLE());
|
||||||
acl.setPermissionManager(root, proposal, proposal.ADD_PROPOSAL_ROLE());
|
acl.setPermissionManager(root, proposal, proposal.ADD_PROPOSAL_ROLE());
|
||||||
acl.setPermissionManager(root, contribution, contribution.ADD_CONTRIBUTION_ROLE());
|
acl.setPermissionManager(root, contribution, contribution.ADD_CONTRIBUTION_ROLE());
|
||||||
acl.setPermissionManager(root, contribution, contribution.VETO_CONTRIBUTION_ROLE());
|
acl.setPermissionManager(root, contribution, contribution.VETO_CONTRIBUTION_ROLE());
|
||||||
|
acl.setPermissionManager(root, contributor, contributor.MANAGE_CONTRIBUTORS_ROLE());
|
||||||
|
|
||||||
acl.createPermission(root, token, token.MINT_TOKEN_ROLE(), this);
|
acl.createPermission(root, token, token.MINT_TOKEN_ROLE(), this);
|
||||||
acl.grantPermission(contribution, token, token.MINT_TOKEN_ROLE());
|
acl.grantPermission(contribution, token, token.MINT_TOKEN_ROLE());
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Contribution deployments
|
# Contribution deployments
|
||||||
|
|
||||||
|
## 2019-04-10 - Weltempfänger release
|
||||||
|
|
||||||
|
✔ Successfully published kredits-contribution.open.aragonpm.eth v5.0.0:
|
||||||
|
ℹ Contract address: 0xe0f7dB486321b917e3A986Bdb2F2b9d51BA98fa9
|
||||||
|
ℹ Content (ipfs): QmU3XEBb4f5jU8MFFEpwaa95C1mhc82UeYLRWLrKsvcQNw
|
||||||
|
ℹ Transaction hash: 0xd736ff5f79f8142be3fad1a50580fb40aa468838da397f8630285fd91a445af3
|
||||||
|
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
✔ Successfully published kredits-contribution.open.aragonpm.eth v4.0.0:
|
||||||
|
ℹ Contract address: 0x7485e8fbde0112C53587079db450Eb002D359372
|
||||||
|
ℹ Content (ipfs): QmZKxYPm8wz4phgL4428Gh7MjmbyFFDMP2st7qhNL9qGDQ
|
||||||
|
ℹ Transaction hash: 0x7d9be7920db675be88e8f60ebf08dc62ee77c4e6e454c5fbf0f91f6ac97e4c26
|
||||||
|
|
||||||
|
|
||||||
## 2019-03-26
|
## 2019-03-26
|
||||||
|
|
||||||
### v3.0.0 appids
|
### v3.0.0 appids
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
# Contributor deployments
|
# Contributor deployments
|
||||||
|
|
||||||
|
## 2019-04-10 - Weltempfänger release
|
||||||
|
|
||||||
|
✔ Successfully published kredits-contributor.open.aragonpm.eth v4.0.0:
|
||||||
|
ℹ Contract address: 0x08a6D4D915FCAA5524F05F5F715a6C17cB6eeA6B
|
||||||
|
ℹ Content (ipfs): QmR62PWwe1EzommfkhJDYcTvHoZjbXuv9dTG6vCn5dWCsb
|
||||||
|
ℹ Transaction hash: 0xd5317c9e207a413485c55ec3046b09d467d978443680304737a6d7d3db0c90e1
|
||||||
|
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
✔ Successfully published kredits-contributor.open.aragonpm.eth v3.0.0:
|
||||||
|
ℹ Contract address: 0x95D8458E28C8de7216279512601A3B9Dc512D70B
|
||||||
|
ℹ Content (ipfs): QmSpHnmsf8FybvqfD49kwxvDixwiBUR7D5yG4BWSnnwCPS
|
||||||
|
ℹ Transaction hash: 0x736f9751b07a91178f453c279ecb57604b3b5686ae5d7115880f3b27fbeb50f2
|
||||||
|
|
||||||
## 2019-03-26
|
## 2019-03-26
|
||||||
|
|
||||||
### v2.0.0 support for appids
|
### v2.0.0 support for appids
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
# Kredits deployment
|
# Kredits deployment
|
||||||
|
|
||||||
|
## 2019-04-10 - Weltempfänger release
|
||||||
|
|
||||||
|
Using KreditsKit at: 0x76e069b47b79442657eaf0555a32c6b16fa1b8b4
|
||||||
|
Created new DAO at: 0xc34edf7d11b7f8433d597f0bb0697acdff55ef14
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
Using KreditsKit at: 0x76e069b47b79442657eaf0555a32c6b16fa1b8b4
|
||||||
|
Created new DAO at: 0xcd75458fbc4aa2231252d5b21f1391fd031e5cb2
|
||||||
|
|
||||||
### 2019-03-26
|
### 2019-03-26
|
||||||
|
|
||||||
kredits/truffle-kredits@aragonos » truffle exec scripts/new-dao.js --network=rinkeby
|
kredits/truffle-kredits@aragonos » truffle exec scripts/new-dao.js --network=rinkeby
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# KreditsKit deployments
|
# KreditsKit deployments
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
Deploying to networkId: 4
|
||||||
|
Using ENS at: 0x98Df287B6C145399Aaa709692c8D308357bC085D
|
||||||
|
Using DAOFactory at: 0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d
|
||||||
|
Found apps: [contribution,contributor,proposal,token].open.aragonpm.eth
|
||||||
|
Deployed KreditsKit at: 0x76e069b47b79442657eaf0555a32c6b16fa1b8b4
|
||||||
|
|
||||||
## 2019-03-26
|
## 2019-03-26
|
||||||
|
|
||||||
Using network 'rinkeby'.
|
Using network 'rinkeby'.
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Proposal deployments
|
# Proposal deployments
|
||||||
|
|
||||||
|
## 2019-04-10 - Weltempfänger release
|
||||||
|
|
||||||
|
✔ Successfully published kredits-proposal.open.aragonpm.eth v5.0.0:
|
||||||
|
ℹ Contract address: 0x4ce5b0286483c66b861e5599a199054687434552
|
||||||
|
ℹ Content (ipfs): QmNYXEcmvKTGxYiob7WUf85oZhdmFDCuGiA6TsRrDE9TYb
|
||||||
|
ℹ Transaction hash: 0x0482b58a1ba87d494c6391026399d0ac41b45384330d916f3f99ba70e501584b
|
||||||
|
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
✔ Successfully published kredits-proposal.open.aragonpm.eth v4.0.0:
|
||||||
|
ℹ Contract address: 0x4993275362Ba50D76f349A262B7b842e7FbD7490
|
||||||
|
ℹ Content (ipfs): QmesCPKLapASPTB3rnPpSdD7ULkg8BQwRcpdE1B8WwfSh7
|
||||||
|
ℹ Transaction hash: 0xe4be7b1a75b663eb345b957b216a8476b0f75e2bbfc5880943b05c82fab15dff
|
||||||
|
|
||||||
|
|
||||||
## 2019-03-26
|
## 2019-03-26
|
||||||
|
|
||||||
### v3.0.0 appids
|
### v3.0.0 appids
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Token deployments
|
# Token deployments
|
||||||
|
|
||||||
|
## 2019-04-10 - Weltempfänger release
|
||||||
|
|
||||||
|
✔ Successfully published kredits-token.open.aragonpm.eth v4.0.0:
|
||||||
|
ℹ Contract address: 0x05E0C2bbdA8e5BeE22AC1E20C1457dA4de63aE26
|
||||||
|
ℹ Content (ipfs): QmUuYLRMRNZcundUk2pxVaSjMNvtB7hzdf3eyoaUNqDPow
|
||||||
|
ℹ Transaction hash: 0x98c28b5ca645904d56eb83c4783682f018c0fcee015b3a3d5fa8bd609223fb89
|
||||||
|
|
||||||
|
|
||||||
|
## 2019-04-04
|
||||||
|
|
||||||
|
✔ Successfully published kredits-token.open.aragonpm.eth v3.0.0:
|
||||||
|
ℹ Contract address: 0xd9913A96e087f50E71BF14c62cBCa3b9635392A9
|
||||||
|
ℹ Content (ipfs): QmfZ7LwjkQRuLsEnVjrEF3ryTaHsL6YTxffiiDS5KWmHQG
|
||||||
|
ℹ Transaction hash: 0x102b27e154d1e144ec084f5e8dc78e1626fda9f26c20db3e3b230fac381c317a
|
||||||
|
|
||||||
|
|
||||||
## 2019-03-26
|
## 2019-03-26
|
||||||
|
|
||||||
### v2.0.0 support for appIds
|
### v2.0.0 support for appIds
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"4": "0x1d6a9c2146a330575ee860eef9a012b5ff7caa68",
|
"4": "0x76e069b47b79442657eaf0555a32c6b16fa1b8b4"
|
||||||
"41787949": "0xa35aacdfccac54d3d96e0d29050c773b251c2c83"
|
}
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"4": "0x95a7ce185efc2d1f13efd2a00ee9247c51ea7009",
|
"4": "0xc34edf7d11b7f8433d597f0bb0697acdff55ef14"
|
||||||
"41787949": "0x183af3950364390a266edff2a0e7c4c2f95c0691"
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
const ethers = require('ethers');
|
const ethers = require('ethers');
|
||||||
const RSVP = require('rsvp');
|
|
||||||
|
|
||||||
const ContributionSerializer = require('../serializers/contribution');
|
const ContributionSerializer = require('../serializers/contribution');
|
||||||
const Base = require('./base');
|
const Base = require('./base');
|
||||||
@@ -7,43 +6,44 @@ const Base = require('./base');
|
|||||||
class Contribution extends Base {
|
class Contribution extends Base {
|
||||||
all() {
|
all() {
|
||||||
return this.functions.contributionsCount()
|
return this.functions.contributionsCount()
|
||||||
.then((count) => {
|
.then(async (count) => {
|
||||||
count = count.toNumber();
|
|
||||||
let contributions = [];
|
let contributions = [];
|
||||||
|
|
||||||
for (let id = 1; id <= count; id++) {
|
for (let id = 1; id <= count; id++) {
|
||||||
contributions.push(this.getById(id));
|
const contribution = await this.getById(id)
|
||||||
|
contributions.push(contribution);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RSVP.all(contributions);
|
return contributions;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getById(id) {
|
getById(id) {
|
||||||
id = ethers.utils.bigNumberify(id);
|
|
||||||
|
|
||||||
return this.functions.getContribution(id)
|
return this.functions.getContribution(id)
|
||||||
.then((data) => {
|
.then(data => {
|
||||||
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getByContributor(contributor) {
|
getByContributorId(contributorId) {
|
||||||
return this.functions.balanceOf(contributor)
|
return this.functions.getContributorAddressById(contributorId)
|
||||||
then((balance) => {
|
.then(address => this.getByContributorAddress(address));
|
||||||
count = balance.toNumber();
|
}
|
||||||
|
|
||||||
let contributions = [];
|
getByContributorAddress(address) {
|
||||||
|
return this.functions.balanceOf(address)
|
||||||
|
.then(async (balance) => {
|
||||||
|
const count = balance.toNumber();
|
||||||
|
const contributions = [];
|
||||||
|
|
||||||
for (let index = 0; index <= count; index++) {
|
for (let index = 0; index < count; index++) {
|
||||||
this.functions.tokenOfOwnerByIndex(contributor, index)
|
const id = await this.functions.tokenOfOwnerByIndex(address, index);
|
||||||
.then((id) => {
|
const contribution = await this.getById(id);
|
||||||
contributions.push(this.getById(id));
|
contributions.push(contribution);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return RSVP.all(contributions);
|
return contributions;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ class Contribution extends Base {
|
|||||||
.then((ipfsHashAttr) => {
|
.then((ipfsHashAttr) => {
|
||||||
let contribution = [
|
let contribution = [
|
||||||
contributionAttr.amount,
|
contributionAttr.amount,
|
||||||
contributionAttr.contributorAccount,
|
contributionAttr.contributorId,
|
||||||
ipfsHashAttr.hashDigest,
|
ipfsHashAttr.hashDigest,
|
||||||
ipfsHashAttr.hashFunction,
|
ipfsHashAttr.hashFunction,
|
||||||
ipfsHashAttr.hashSize,
|
ipfsHashAttr.hashSize,
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ const Base = require('./base');
|
|||||||
class Contributor extends Base {
|
class Contributor extends Base {
|
||||||
all() {
|
all() {
|
||||||
return this.functions.contributorsCount()
|
return this.functions.contributorsCount()
|
||||||
.then((count) => {
|
.then(count => {
|
||||||
count = count.toNumber();
|
|
||||||
let contributors = [];
|
let contributors = [];
|
||||||
|
|
||||||
for (let id = 1; id <= count; id++) {
|
for (let id = 1; id <= count; id++) {
|
||||||
@@ -20,14 +19,7 @@ class Contributor extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getById(id) {
|
getById(id) {
|
||||||
id = ethers.utils.bigNumberify(id);
|
|
||||||
|
|
||||||
return this.functions.getContributorById(id)
|
return this.functions.getContributorById(id)
|
||||||
.then((data) => {
|
|
||||||
// TODO: remove when naming updated on the contract
|
|
||||||
data.hashDigest = data.ipfsHash;
|
|
||||||
return data;
|
|
||||||
})
|
|
||||||
// Fetch IPFS data if available
|
// Fetch IPFS data if available
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
return this.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
|
return this.ipfs.catAndMerge(data, ContributorSerializer.deserialize);
|
||||||
@@ -70,7 +62,6 @@ class Contributor extends Base {
|
|||||||
ipfsHashAttr.hashDigest,
|
ipfsHashAttr.hashDigest,
|
||||||
ipfsHashAttr.hashFunction,
|
ipfsHashAttr.hashFunction,
|
||||||
ipfsHashAttr.hashSize,
|
ipfsHashAttr.hashSize,
|
||||||
contributorAttr.isCore,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return this.functions.addContributor(...contributor, callOptions);
|
return this.functions.addContributor(...contributor, callOptions);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const namehash = require('eth-ens-namehash').hash;
|
const namehash = require('ethers').utils.namehash;
|
||||||
const Base = require('./base');
|
const Base = require('./base');
|
||||||
|
|
||||||
const KERNEL_APP_ADDR_NAMESPACE = '0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb';
|
const KERNEL_APP_ADDR_NAMESPACE = '0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb';
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ const Base = require('./base');
|
|||||||
class Proposal extends Base {
|
class Proposal extends Base {
|
||||||
all() {
|
all() {
|
||||||
return this.functions.proposalsCount()
|
return this.functions.proposalsCount()
|
||||||
.then((count) => {
|
.then(count => {
|
||||||
count = count.toNumber();
|
|
||||||
let proposals = [];
|
let proposals = [];
|
||||||
|
|
||||||
for (let id = 1; id <= count; id++) {
|
for (let id = 1; id <= count; id++) {
|
||||||
@@ -20,10 +19,8 @@ class Proposal extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getById(id) {
|
getById(id) {
|
||||||
id = ethers.utils.bigNumberify(id);
|
|
||||||
|
|
||||||
return this.functions.getProposal(id)
|
return this.functions.getProposal(id)
|
||||||
.then((data) => {
|
.then(data => {
|
||||||
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
return this.ipfs.catAndMerge(data, ContributionSerializer.deserialize);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const ipfsAPI = require('ipfs-api');
|
const ipfsClient = require('ipfs-http-client');
|
||||||
const multihashes = require('multihashes');
|
const multihashes = require('multihashes');
|
||||||
|
|
||||||
class IPFS {
|
class IPFS {
|
||||||
@@ -7,7 +7,7 @@ class IPFS {
|
|||||||
if (!config) {
|
if (!config) {
|
||||||
config = { host: 'localhost', port: '5001', protocol: 'http' };
|
config = { host: 'localhost', port: '5001', protocol: 'http' };
|
||||||
}
|
}
|
||||||
this._ipfsAPI = ipfsAPI(config);
|
this._ipfsAPI = ipfsClient(config);
|
||||||
this._config = config;
|
this._config = config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ class IPFS {
|
|||||||
|
|
||||||
add(data) {
|
add(data) {
|
||||||
return this._ipfsAPI
|
return this._ipfsAPI
|
||||||
.add(new this._ipfsAPI.Buffer(data))
|
.add(ipfsClient.Buffer.from(data))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
return this.decodeHash(res[0].hash);
|
return this.decodeHash(res[0].hash);
|
||||||
});
|
});
|
||||||
@@ -53,7 +53,7 @@ class IPFS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
encodeHash(hashData) {
|
encodeHash(hashData) {
|
||||||
let digest = this._ipfsAPI.Buffer.from(hashData.hashDigest.slice(2), 'hex');
|
let digest = ipfsClient.Buffer.from(hashData.hashDigest.slice(2), 'hex');
|
||||||
return multihashes.encode(digest, hashData.hashFunction, hashData.hashSize);
|
return multihashes.encode(digest, hashData.hashFunction, hashData.hashSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
240
package-lock.json
generated
240
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "3.0.2",
|
"version": "4.0.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -863,8 +863,7 @@
|
|||||||
"asmcrypto.js": {
|
"asmcrypto.js": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-2.3.2.tgz",
|
||||||
"integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA==",
|
"integrity": "sha512-3FgFARf7RupsZETQ1nHnhLUUvpcttcCq1iZCaVAbJZbCZ5VNRrNyvpDyHTOb0KC3llFcsyOT/a99NZcCbeiEsA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"asn1": {
|
"asn1": {
|
||||||
"version": "0.2.4",
|
"version": "0.2.4",
|
||||||
@@ -1652,7 +1651,8 @@
|
|||||||
"big.js": {
|
"big.js": {
|
||||||
"version": "5.2.2",
|
"version": "5.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||||
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
|
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"bignumber.js": {
|
"bignumber.js": {
|
||||||
"version": "7.2.1",
|
"version": "7.2.1",
|
||||||
@@ -1703,6 +1703,7 @@
|
|||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
|
||||||
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
|
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "^2.3.5",
|
"readable-stream": "^2.3.5",
|
||||||
"safe-buffer": "^5.1.1"
|
"safe-buffer": "^5.1.1"
|
||||||
@@ -1772,7 +1773,6 @@
|
|||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/borc/-/borc-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/borc/-/borc-2.1.0.tgz",
|
||||||
"integrity": "sha512-hKTxeYt3AIzIG45epJHv8xJYSF0ktp7nZgFsqi5cPzoL3T8qKMPeUlqydORy6j3NWZvRDANx30PjpTmGho69Gw==",
|
"integrity": "sha512-hKTxeYt3AIzIG45epJHv8xJYSF0ktp7nZgFsqi5cPzoL3T8qKMPeUlqydORy6j3NWZvRDANx30PjpTmGho69Gw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bignumber.js": "^8.0.1",
|
"bignumber.js": "^8.0.1",
|
||||||
"commander": "^2.15.0",
|
"commander": "^2.15.0",
|
||||||
@@ -1784,14 +1784,12 @@
|
|||||||
"bignumber.js": {
|
"bignumber.js": {
|
||||||
"version": "8.1.1",
|
"version": "8.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz",
|
||||||
"integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ==",
|
"integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"commander": {
|
"commander": {
|
||||||
"version": "2.19.0",
|
"version": "2.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
||||||
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
|
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg=="
|
||||||
"dev": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1954,6 +1952,7 @@
|
|||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
|
||||||
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-alloc-unsafe": "^1.1.0",
|
"buffer-alloc-unsafe": "^1.1.0",
|
||||||
"buffer-fill": "^1.0.0"
|
"buffer-fill": "^1.0.0"
|
||||||
@@ -1962,7 +1961,8 @@
|
|||||||
"buffer-alloc-unsafe": {
|
"buffer-alloc-unsafe": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
|
||||||
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
|
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"buffer-crc32": {
|
"buffer-crc32": {
|
||||||
"version": "0.2.13",
|
"version": "0.2.13",
|
||||||
@@ -1973,17 +1973,20 @@
|
|||||||
"buffer-fill": {
|
"buffer-fill": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
|
||||||
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
|
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"buffer-from": {
|
"buffer-from": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"buffer-loader": {
|
"buffer-loader": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/buffer-loader/-/buffer-loader-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/buffer-loader/-/buffer-loader-0.0.1.tgz",
|
||||||
"integrity": "sha1-TWd8qS3YiTEIeLAqL7z6txICTPI="
|
"integrity": "sha1-TWd8qS3YiTEIeLAqL7z6txICTPI=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"buffer-to-arraybuffer": {
|
"buffer-to-arraybuffer": {
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
@@ -2260,6 +2263,7 @@
|
|||||||
"version": "1.6.2",
|
"version": "1.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
||||||
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-from": "^1.0.0",
|
"buffer-from": "^1.0.0",
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
@@ -2315,7 +2319,8 @@
|
|||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"cors": {
|
"cors": {
|
||||||
"version": "2.8.5",
|
"version": "2.8.5",
|
||||||
@@ -2595,8 +2600,7 @@
|
|||||||
"delimit-stream": {
|
"delimit-stream": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz",
|
||||||
"integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=",
|
"integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"depd": {
|
"depd": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
@@ -2765,8 +2769,7 @@
|
|||||||
"err-code": {
|
"err-code": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz",
|
||||||
"integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=",
|
"integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"errno": {
|
"errno": {
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
@@ -2888,6 +2891,7 @@
|
|||||||
"version": "2.0.8",
|
"version": "2.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz",
|
||||||
"integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=",
|
"integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"idna-uts46-hx": "^2.3.1",
|
"idna-uts46-hx": "^2.3.1",
|
||||||
"js-sha3": "^0.5.7"
|
"js-sha3": "^0.5.7"
|
||||||
@@ -10174,6 +10178,7 @@
|
|||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz",
|
||||||
"integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==",
|
"integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"punycode": "2.1.0"
|
"punycode": "2.1.0"
|
||||||
}
|
}
|
||||||
@@ -10181,8 +10186,7 @@
|
|||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.1.13",
|
"version": "1.1.13",
|
||||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
|
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
|
||||||
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
|
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ignore": {
|
"ignore": {
|
||||||
"version": "3.3.10",
|
"version": "3.3.10",
|
||||||
@@ -10360,8 +10364,7 @@
|
|||||||
"ip-regex": {
|
"ip-regex": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
|
||||||
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=",
|
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ipaddr.js": {
|
"ipaddr.js": {
|
||||||
"version": "1.8.0",
|
"version": "1.8.0",
|
||||||
@@ -10369,47 +10372,11 @@
|
|||||||
"integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=",
|
"integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ipfs-api": {
|
|
||||||
"version": "19.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-api/-/ipfs-api-19.0.0.tgz",
|
|
||||||
"integrity": "sha512-eDWW66KccHbK/yHlrKdmzw7Tm15tocIgr8Hrwx9xiZinxqtXbsM1AorKTaJ7ZJLls97KiclPRMRIDTIL54q++g==",
|
|
||||||
"requires": {
|
|
||||||
"async": "^2.6.0",
|
|
||||||
"big.js": "^5.0.3",
|
|
||||||
"bs58": "^4.0.1",
|
|
||||||
"cids": "~0.5.3",
|
|
||||||
"concat-stream": "^1.6.2",
|
|
||||||
"detect-node": "^2.0.3",
|
|
||||||
"flatmap": "0.0.3",
|
|
||||||
"glob": "^7.1.2",
|
|
||||||
"ipfs-block": "~0.6.1",
|
|
||||||
"ipfs-unixfs": "~0.1.14",
|
|
||||||
"ipld-dag-pb": "~0.13.1",
|
|
||||||
"is-ipfs": "^0.3.2",
|
|
||||||
"is-stream": "^1.1.0",
|
|
||||||
"lru-cache": "^4.1.2",
|
|
||||||
"multiaddr": "^3.1.0",
|
|
||||||
"multihashes": "~0.4.13",
|
|
||||||
"ndjson": "^1.5.0",
|
|
||||||
"once": "^1.4.0",
|
|
||||||
"peer-id": "~0.10.6",
|
|
||||||
"peer-info": "~0.11.6",
|
|
||||||
"promisify-es6": "^1.0.3",
|
|
||||||
"pull-defer": "^0.2.2",
|
|
||||||
"pull-pushable": "^2.2.0",
|
|
||||||
"pump": "^3.0.0",
|
|
||||||
"qs": "^6.5.1",
|
|
||||||
"readable-stream": "^2.3.5",
|
|
||||||
"stream-http": "^2.8.1",
|
|
||||||
"stream-to-pull-stream": "^1.7.2",
|
|
||||||
"streamifier": "^0.1.1",
|
|
||||||
"tar-stream": "^1.5.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ipfs-block": {
|
"ipfs-block": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.6.1.tgz",
|
||||||
"integrity": "sha512-28dgGsb2YsYnFs+To4cVBX8e/lTCb8eWDzGhN5csj3a/sHMOYrHeK8+Ez0IV67CI3lqKGuG/ZD01Cmd6JUvKrQ==",
|
"integrity": "sha512-28dgGsb2YsYnFs+To4cVBX8e/lTCb8eWDzGhN5csj3a/sHMOYrHeK8+Ez0IV67CI3lqKGuG/ZD01Cmd6JUvKrQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"cids": "^0.5.2"
|
"cids": "^0.5.2"
|
||||||
}
|
}
|
||||||
@@ -10418,7 +10385,6 @@
|
|||||||
"version": "30.1.1",
|
"version": "30.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.1.tgz",
|
||||||
"integrity": "sha512-tMqSwEhW57VnjHDBLjKKlgtAvlhkqVSR3oIFC0IiGnaM1nzcw7pbFBoHaFzl0PKIuXm40a5bJt85Rm2trYx+Ag==",
|
"integrity": "sha512-tMqSwEhW57VnjHDBLjKKlgtAvlhkqVSR3oIFC0IiGnaM1nzcw7pbFBoHaFzl0PKIuXm40a5bJt85Rm2trYx+Ag==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"bignumber.js": "^8.0.2",
|
"bignumber.js": "^8.0.2",
|
||||||
@@ -10466,14 +10432,12 @@
|
|||||||
"bignumber.js": {
|
"bignumber.js": {
|
||||||
"version": "8.1.1",
|
"version": "8.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz",
|
||||||
"integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ==",
|
"integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"bl": {
|
"bl": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bl/-/bl-3.0.0.tgz",
|
||||||
"integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==",
|
"integrity": "sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "^3.0.1"
|
"readable-stream": "^3.0.1"
|
||||||
}
|
}
|
||||||
@@ -10481,7 +10445,6 @@
|
|||||||
"concat-stream": {
|
"concat-stream": {
|
||||||
"version": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034",
|
"version": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034",
|
||||||
"from": "github:hugomrdias/concat-stream#feat/smaller",
|
"from": "github:hugomrdias/concat-stream#feat/smaller",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
"readable-stream": "^3.0.2"
|
"readable-stream": "^3.0.2"
|
||||||
@@ -10491,7 +10454,6 @@
|
|||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
@@ -10500,7 +10462,6 @@
|
|||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.0.tgz",
|
||||||
"integrity": "sha512-znNtFRxXlJYP1/Q4u0tGFJUceH9pNww8WA+zair6T3y7d28m+vtUDJGn96M7ZlFFSkByQyQsAiq2ssNhKtMzxw==",
|
"integrity": "sha512-znNtFRxXlJYP1/Q4u0tGFJUceH9pNww8WA+zair6T3y7d28m+vtUDJGn96M7ZlFFSkByQyQsAiq2ssNhKtMzxw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"cids": "~0.5.5",
|
"cids": "~0.5.5",
|
||||||
"class-is": "^1.1.0"
|
"class-is": "^1.1.0"
|
||||||
@@ -10510,7 +10471,6 @@
|
|||||||
"version": "0.13.1",
|
"version": "0.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.13.1.tgz",
|
||||||
"integrity": "sha512-96KKh5XUq9LrWE/TQ/BOJ5FcQx7UZ892N76ufDdovq+fIwZ4/YpPRTAVssLUuN3crATHoGu80TVZMgevsuTCdQ==",
|
"integrity": "sha512-96KKh5XUq9LrWE/TQ/BOJ5FcQx7UZ892N76ufDdovq+fIwZ4/YpPRTAVssLUuN3crATHoGu80TVZMgevsuTCdQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"borc": "^2.1.0",
|
"borc": "^2.1.0",
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
@@ -10525,7 +10485,6 @@
|
|||||||
"version": "0.15.3",
|
"version": "0.15.3",
|
||||||
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.15.3.tgz",
|
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.15.3.tgz",
|
||||||
"integrity": "sha512-J1RJzSVCaOpxPmSzXbwVNsAZPHctjY4OjqG1dMIG86Z37CKvuy1QwCFkDhNccUTcQpF3sXfj5e0ZUyMM035vzg==",
|
"integrity": "sha512-J1RJzSVCaOpxPmSzXbwVNsAZPHctjY4OjqG1dMIG86Z37CKvuy1QwCFkDhNccUTcQpF3sXfj5e0ZUyMM035vzg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
@@ -10543,7 +10502,6 @@
|
|||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.0.tgz",
|
||||||
"integrity": "sha512-q/CO69rN+vbw9eGXGQOAa15zXq+pSyhdKvE7mqvuplDu67LyT3H9t3RyYQvKpueN7dL4f6fbyjEMPp9J3rJ4qA==",
|
"integrity": "sha512-q/CO69rN+vbw9eGXGQOAa15zXq+pSyhdKvE7mqvuplDu67LyT3H9t3RyYQvKpueN7dL4f6fbyjEMPp9J3rJ4qA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"cids": "~0.5.6",
|
"cids": "~0.5.6",
|
||||||
@@ -10556,14 +10514,12 @@
|
|||||||
"js-sha3": {
|
"js-sha3": {
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz",
|
||||||
"integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==",
|
"integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"libp2p-crypto": {
|
"libp2p-crypto": {
|
||||||
"version": "0.16.1",
|
"version": "0.16.1",
|
||||||
"resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.1.tgz",
|
"resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.1.tgz",
|
||||||
"integrity": "sha512-+fxqy+cDjwOKK4KTj44WQmjPE5ep2eR5uAIQWHl/+RKvRSor3+RAY53VWkAecgAEvjX2AswxBsoCIJK1Qk5aIQ==",
|
"integrity": "sha512-+fxqy+cDjwOKK4KTj44WQmjPE5ep2eR5uAIQWHl/+RKvRSor3+RAY53VWkAecgAEvjX2AswxBsoCIJK1Qk5aIQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"asmcrypto.js": "^2.3.2",
|
"asmcrypto.js": "^2.3.2",
|
||||||
"asn1.js": "^5.0.1",
|
"asn1.js": "^5.0.1",
|
||||||
@@ -10587,7 +10543,6 @@
|
|||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.3.0.tgz",
|
||||||
"integrity": "sha512-+rF3S5p2pzS4JLDwVE6gLWZeaKkpl4NkYwG+0knV6ot29UcRSb73OyCWl07r1h5+g9E3KZC3wpsu+RIK5w8zQA==",
|
"integrity": "sha512-+rF3S5p2pzS4JLDwVE6gLWZeaKkpl4NkYwG+0knV6ot29UcRSb73OyCWl07r1h5+g9E3KZC3wpsu+RIK5w8zQA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
@@ -10601,7 +10556,6 @@
|
|||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||||
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"yallist": "^3.0.2"
|
"yallist": "^3.0.2"
|
||||||
}
|
}
|
||||||
@@ -10609,14 +10563,12 @@
|
|||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"multiaddr": {
|
"multiaddr": {
|
||||||
"version": "6.0.6",
|
"version": "6.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz",
|
||||||
"integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==",
|
"integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"class-is": "^1.1.0",
|
"class-is": "^1.1.0",
|
||||||
@@ -10629,7 +10581,6 @@
|
|||||||
"version": "0.5.2",
|
"version": "0.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz",
|
||||||
"integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==",
|
"integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"blakejs": "^1.1.0",
|
"blakejs": "^1.1.0",
|
||||||
"js-sha3": "~0.8.0",
|
"js-sha3": "~0.8.0",
|
||||||
@@ -10641,7 +10592,6 @@
|
|||||||
"ndjson": {
|
"ndjson": {
|
||||||
"version": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11",
|
"version": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11",
|
||||||
"from": "github:hugomrdias/ndjson#feat/readable-stream3",
|
"from": "github:hugomrdias/ndjson#feat/readable-stream3",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
@@ -10653,7 +10603,6 @@
|
|||||||
"version": "0.12.2",
|
"version": "0.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.2.tgz",
|
"resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.2.tgz",
|
||||||
"integrity": "sha512-pked3yPLcOcprH21OnYbJAzk9OgI/TDEqjJ0IfRJSVB/61ZyqU5VKO7cw7hul+YD8nTD79wM79xFRWN3f6otNg==",
|
"integrity": "sha512-pked3yPLcOcprH21OnYbJAzk9OgI/TDEqjJ0IfRJSVB/61ZyqU5VKO7cw7hul+YD8nTD79wM79xFRWN3f6otNg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"class-is": "^1.1.0",
|
"class-is": "^1.1.0",
|
||||||
@@ -10665,7 +10614,6 @@
|
|||||||
"version": "0.15.1",
|
"version": "0.15.1",
|
||||||
"resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.15.1.tgz",
|
||||||
"integrity": "sha512-Y91Q2tZRC0CpSTPd1UebhGqniOrOAk/aj60uYUcWJXCoLTAnGu+4LJGoiay8ayudS6ice7l3SKhgL/cS62QacA==",
|
"integrity": "sha512-Y91Q2tZRC0CpSTPd1UebhGqniOrOAk/aj60uYUcWJXCoLTAnGu+4LJGoiay8ayudS6ice7l3SKhgL/cS62QacA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"mafmt": "^6.0.2",
|
"mafmt": "^6.0.2",
|
||||||
"multiaddr": "^6.0.3",
|
"multiaddr": "^6.0.3",
|
||||||
@@ -10677,7 +10625,6 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz",
|
||||||
"integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==",
|
"integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1.js": "^5.0.1"
|
"asn1.js": "^5.0.1"
|
||||||
}
|
}
|
||||||
@@ -10686,7 +10633,6 @@
|
|||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
"string_decoder": "^1.1.1",
|
"string_decoder": "^1.1.1",
|
||||||
@@ -10697,7 +10643,6 @@
|
|||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz",
|
||||||
"integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==",
|
"integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "^3.0.0"
|
"readable-stream": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -10706,7 +10651,6 @@
|
|||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.0.1.tgz",
|
||||||
"integrity": "sha512-I6OJF7wE62BC6zNPdHDtseK0D0187PBjbKSLYY4ffvVkBM6tyBn2O9plDvVM2229/mozfEL/X3++qSvYYQE2xw==",
|
"integrity": "sha512-I6OJF7wE62BC6zNPdHDtseK0D0187PBjbKSLYY4ffvVkBM6tyBn2O9plDvVM2229/mozfEL/X3++qSvYYQE2xw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bl": "^3.0.0",
|
"bl": "^3.0.0",
|
||||||
"end-of-stream": "^1.4.1",
|
"end-of-stream": "^1.4.1",
|
||||||
@@ -10719,7 +10663,6 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz",
|
||||||
"integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
|
"integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "2 || 3"
|
"readable-stream": "2 || 3"
|
||||||
}
|
}
|
||||||
@@ -10727,14 +10670,12 @@
|
|||||||
"traverse": {
|
"traverse": {
|
||||||
"version": "0.6.6",
|
"version": "0.6.6",
|
||||||
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz",
|
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz",
|
||||||
"integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=",
|
"integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
|
||||||
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
|
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
|
||||||
"dev": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -10742,6 +10683,7 @@
|
|||||||
"version": "0.1.16",
|
"version": "0.1.16",
|
||||||
"resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-0.1.16.tgz",
|
"resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-0.1.16.tgz",
|
||||||
"integrity": "sha512-TX9Dyu77MxpLzGh/LcQne95TofOyvOeW0oOi72aBMMcV1ItP3684e6NTG9KY1qzdrC+ZUR8kT7y18J058n8KXg==",
|
"integrity": "sha512-TX9Dyu77MxpLzGh/LcQne95TofOyvOeW0oOi72aBMMcV1ItP3684e6NTG9KY1qzdrC+ZUR8kT7y18J058n8KXg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"protons": "^1.0.1"
|
"protons": "^1.0.1"
|
||||||
}
|
}
|
||||||
@@ -10789,25 +10731,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ipld-dag-pb": {
|
|
||||||
"version": "0.13.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.13.1.tgz",
|
|
||||||
"integrity": "sha512-HxybRQvpY8IQ9T0bImlT5v4LBR3jJAgEnFRA/ZU2UNIiBuRkbirI9+VSX03+WkiYooiFMoZz6Qp/xYMdoogNWg==",
|
|
||||||
"requires": {
|
|
||||||
"async": "^2.6.0",
|
|
||||||
"bs58": "^4.0.1",
|
|
||||||
"buffer-loader": "0.0.1",
|
|
||||||
"cids": "~0.5.2",
|
|
||||||
"ipfs-block": "~0.6.1",
|
|
||||||
"is-ipfs": "~0.3.2",
|
|
||||||
"multihashes": "~0.4.12",
|
|
||||||
"multihashing-async": "~0.4.7",
|
|
||||||
"protons": "^1.0.1",
|
|
||||||
"pull-stream": "^3.6.1",
|
|
||||||
"pull-traverse": "^1.0.3",
|
|
||||||
"stable": "^0.1.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"is-arrayish": {
|
"is-arrayish": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
@@ -10829,8 +10752,7 @@
|
|||||||
"is-circular": {
|
"is-circular": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz",
|
||||||
"integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==",
|
"integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"is-date-object": {
|
"is-date-object": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@@ -10890,7 +10812,6 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-ip/-/is-ip-2.0.0.tgz",
|
||||||
"integrity": "sha1-aO6gfooKCpTC0IDdZ0xzGrKkYas=",
|
"integrity": "sha1-aO6gfooKCpTC0IDdZ0xzGrKkYas=",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ip-regex": "^2.0.0"
|
"ip-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -10899,6 +10820,7 @@
|
|||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.3.2.tgz",
|
||||||
"integrity": "sha512-82V1j4LMkYy7H4seQQzOWqo7FiW3I64/1/ryo3dhtWKfOvm7ZolLMRQQfGKs4OXWauh5rAkPnamVcRISHwhmpQ==",
|
"integrity": "sha512-82V1j4LMkYy7H4seQQzOWqo7FiW3I64/1/ryo3dhtWKfOvm7ZolLMRQQfGKs4OXWauh5rAkPnamVcRISHwhmpQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"cids": "~0.5.1",
|
"cids": "~0.5.1",
|
||||||
@@ -10954,8 +10876,7 @@
|
|||||||
"is-pull-stream": {
|
"is-pull-stream": {
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-pull-stream/-/is-pull-stream-0.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-pull-stream/-/is-pull-stream-0.0.0.tgz",
|
||||||
"integrity": "sha1-o7w9HG0wVRUcRr3m85nv7SFEDKk=",
|
"integrity": "sha1-o7w9HG0wVRUcRr3m85nv7SFEDKk="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"is-regex": {
|
"is-regex": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
@@ -11013,7 +10934,8 @@
|
|||||||
"isarray": {
|
"isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"isexe": {
|
"isexe": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@@ -11024,14 +10946,12 @@
|
|||||||
"iso-random-stream": {
|
"iso-random-stream": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz",
|
||||||
"integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ==",
|
"integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"iso-stream-http": {
|
"iso-stream-http": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/iso-stream-http/-/iso-stream-http-0.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/iso-stream-http/-/iso-stream-http-0.1.2.tgz",
|
||||||
"integrity": "sha512-oHEDNOysIMTNypbg2f1SlydqRBvjl4ZbSE9+0awVxnkx3K2stGTFwB/kpVqnB6UEfF8QD36kAjDwZvqyXBLMnQ==",
|
"integrity": "sha512-oHEDNOysIMTNypbg2f1SlydqRBvjl4ZbSE9+0awVxnkx3K2stGTFwB/kpVqnB6UEfF8QD36kAjDwZvqyXBLMnQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"builtin-status-codes": "^3.0.0",
|
"builtin-status-codes": "^3.0.0",
|
||||||
"inherits": "^2.0.1",
|
"inherits": "^2.0.1",
|
||||||
@@ -11042,7 +10962,6 @@
|
|||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
"string_decoder": "^1.1.1",
|
"string_decoder": "^1.1.1",
|
||||||
@@ -11054,8 +10973,7 @@
|
|||||||
"iso-url": {
|
"iso-url": {
|
||||||
"version": "0.4.6",
|
"version": "0.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.6.tgz",
|
"resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.6.tgz",
|
||||||
"integrity": "sha512-YQO7+aIe6l1aSJUKOx+Vrv08DlhZeLFIVfehG2L29KLSEb9RszqPXilxJRVpp57px36BddKR5ZsebacO5qG0tg==",
|
"integrity": "sha512-YQO7+aIe6l1aSJUKOx+Vrv08DlhZeLFIVfehG2L29KLSEb9RszqPXilxJRVpp57px36BddKR5ZsebacO5qG0tg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"isomorphic-fetch": {
|
"isomorphic-fetch": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
@@ -11177,7 +11095,6 @@
|
|||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz",
|
||||||
"integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=",
|
"integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"delimit-stream": "0.1.0"
|
"delimit-stream": "0.1.0"
|
||||||
}
|
}
|
||||||
@@ -11218,14 +11135,12 @@
|
|||||||
"just-kebab-case": {
|
"just-kebab-case": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/just-kebab-case/-/just-kebab-case-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/just-kebab-case/-/just-kebab-case-1.1.0.tgz",
|
||||||
"integrity": "sha512-QkuwuBMQ9BQHMUEkAtIA4INLrkmnnveqlFB1oFi09gbU0wBdZo6tTnyxNWMR84zHxBuwK7GLAwqN8nrvVxOLTA==",
|
"integrity": "sha512-QkuwuBMQ9BQHMUEkAtIA4INLrkmnnveqlFB1oFi09gbU0wBdZo6tTnyxNWMR84zHxBuwK7GLAwqN8nrvVxOLTA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"just-map-keys": {
|
"just-map-keys": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/just-map-keys/-/just-map-keys-1.1.0.tgz",
|
||||||
"integrity": "sha512-oNKi+4y7fr8lXnhKYpBbCkiwHRVkAnx0VDkCeTDtKKMzGr1Lz1Yym+RSieKUTKim68emC5Yxrb4YmiF9STDO+g==",
|
"integrity": "sha512-oNKi+4y7fr8lXnhKYpBbCkiwHRVkAnx0VDkCeTDtKKMzGr1Lz1Yym+RSieKUTKim68emC5Yxrb4YmiF9STDO+g=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"keccak": {
|
"keccak": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
@@ -11397,6 +11312,7 @@
|
|||||||
"version": "0.12.1",
|
"version": "0.12.1",
|
||||||
"resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.12.1.tgz",
|
"resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.12.1.tgz",
|
||||||
"integrity": "sha512-1/z8rxZ0DcQNreZhEsl7PnLr7DWOioSvYbKBLGkRwNRiNh1JJLgh0PdTySBb44wkrOGT+TxcGRd7iq3/X6Wxwg==",
|
"integrity": "sha512-1/z8rxZ0DcQNreZhEsl7PnLr7DWOioSvYbKBLGkRwNRiNh1JJLgh0PdTySBb44wkrOGT+TxcGRd7iq3/X6Wxwg==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1.js": "^5.0.0",
|
"asn1.js": "^5.0.0",
|
||||||
"async": "^2.6.0",
|
"async": "^2.6.0",
|
||||||
@@ -11417,6 +11333,7 @@
|
|||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/libp2p-crypto-secp256k1/-/libp2p-crypto-secp256k1-0.2.3.tgz",
|
||||||
"integrity": "sha512-DFrK89VdboacqM3vqWV8yt8FH9Ni181JJAOU2tRkJfUN9tNEV7VfZEg390NJxEQQbLsyH4HZ7on3QTpPHMHQZQ==",
|
"integrity": "sha512-DFrK89VdboacqM3vqWV8yt8FH9Ni181JJAOU2tRkJfUN9tNEV7VfZEg390NJxEQQbLsyH4HZ7on3QTpPHMHQZQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.1",
|
"async": "^2.6.1",
|
||||||
"multihashing-async": "~0.5.1",
|
"multihashing-async": "~0.5.1",
|
||||||
@@ -11428,12 +11345,14 @@
|
|||||||
"js-sha3": {
|
"js-sha3": {
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz",
|
||||||
"integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q=="
|
"integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"multihashing-async": {
|
"multihashing-async": {
|
||||||
"version": "0.5.2",
|
"version": "0.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.5.2.tgz",
|
||||||
"integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==",
|
"integrity": "sha512-mmyG6M/FKxrpBh9xQDUvuJ7BbqT93ZeEeH5X6LeMYKoYshYLr9BDdCsvDtZvn+Egf+/Xi+aOznrWL4vp3s+p0Q==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"blakejs": "^1.1.0",
|
"blakejs": "^1.1.0",
|
||||||
"js-sha3": "~0.8.0",
|
"js-sha3": "~0.8.0",
|
||||||
@@ -11705,7 +11624,8 @@
|
|||||||
"lodash.filter": {
|
"lodash.filter": {
|
||||||
"version": "4.6.0",
|
"version": "4.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz",
|
||||||
"integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4="
|
"integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash.find": {
|
"lodash.find": {
|
||||||
"version": "4.6.0",
|
"version": "4.6.0",
|
||||||
@@ -11722,7 +11642,8 @@
|
|||||||
"lodash.map": {
|
"lodash.map": {
|
||||||
"version": "4.6.0",
|
"version": "4.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz",
|
||||||
"integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM="
|
"integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"lodash.max": {
|
"lodash.max": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
@@ -11751,7 +11672,8 @@
|
|||||||
"lodash.uniqby": {
|
"lodash.uniqby": {
|
||||||
"version": "4.7.0",
|
"version": "4.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
|
||||||
"integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI="
|
"integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"log-symbols": {
|
"log-symbols": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -11811,6 +11733,7 @@
|
|||||||
"version": "4.1.5",
|
"version": "4.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
|
||||||
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"pseudomap": "^1.0.2",
|
"pseudomap": "^1.0.2",
|
||||||
"yallist": "^2.1.2"
|
"yallist": "^2.1.2"
|
||||||
@@ -11826,7 +11749,6 @@
|
|||||||
"version": "6.0.7",
|
"version": "6.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.7.tgz",
|
||||||
"integrity": "sha512-2OG/EGAJZmpZBl7YRT1hD83sZa2gKsUEdegRuURreIOe7B4VeHU1rYYmhgk7BkLzknGL3xGYsDx3bbSgEEzE7g==",
|
"integrity": "sha512-2OG/EGAJZmpZBl7YRT1hD83sZa2gKsUEdegRuURreIOe7B4VeHU1rYYmhgk7BkLzknGL3xGYsDx3bbSgEEzE7g==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"multiaddr": "^6.0.4"
|
"multiaddr": "^6.0.4"
|
||||||
},
|
},
|
||||||
@@ -11835,7 +11757,6 @@
|
|||||||
"version": "6.0.6",
|
"version": "6.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz",
|
||||||
"integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==",
|
"integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"class-is": "^1.1.0",
|
"class-is": "^1.1.0",
|
||||||
@@ -12213,6 +12134,7 @@
|
|||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-3.1.0.tgz",
|
||||||
"integrity": "sha512-QhmsD/TufS5KB7brd1rkzLz2sJqybQlDT9prroiWacaw61DtHoe2X/vcAnOu8mZc7s7ZzevFPvY5tzv3yjBXlQ==",
|
"integrity": "sha512-QhmsD/TufS5KB7brd1rkzLz2sJqybQlDT9prroiWacaw61DtHoe2X/vcAnOu8mZc7s7ZzevFPvY5tzv3yjBXlQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"ip": "^1.1.5",
|
"ip": "^1.1.5",
|
||||||
@@ -12261,6 +12183,7 @@
|
|||||||
"version": "0.4.8",
|
"version": "0.4.8",
|
||||||
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.4.8.tgz",
|
"resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.4.8.tgz",
|
||||||
"integrity": "sha512-LCc4lfxmTJOHKIjZjFNgvmfB6nXS/ErLInT9uwU8udFrRm2PH+aTPk3mfCREKmCiSHOlCWiv2O8rlnBx+OjlMw==",
|
"integrity": "sha512-LCc4lfxmTJOHKIjZjFNgvmfB6nXS/ErLInT9uwU8udFrRm2PH+aTPk3mfCREKmCiSHOlCWiv2O8rlnBx+OjlMw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.0",
|
"async": "^2.6.0",
|
||||||
"blakejs": "^1.1.0",
|
"blakejs": "^1.1.0",
|
||||||
@@ -12273,7 +12196,8 @@
|
|||||||
"js-sha3": {
|
"js-sha3": {
|
||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz",
|
||||||
"integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA=="
|
"integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==",
|
||||||
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -12334,6 +12258,7 @@
|
|||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/ndjson/-/ndjson-1.5.0.tgz",
|
||||||
"integrity": "sha1-rmA7NrE0vOw0e0UkIrC/mNWDLsg=",
|
"integrity": "sha1-rmA7NrE0vOw0e0UkIrC/mNWDLsg=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
@@ -12760,6 +12685,7 @@
|
|||||||
"version": "0.10.7",
|
"version": "0.10.7",
|
||||||
"resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.10.7.tgz",
|
"resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.10.7.tgz",
|
||||||
"integrity": "sha512-VEpMFcL9q0NQijmR0jsj38OGbY4yzaWMEareVkDahopmlNT+Cpsot8btPgsgBBApP9NiZj2Enwvh8rZN30ocQw==",
|
"integrity": "sha512-VEpMFcL9q0NQijmR0jsj38OGbY4yzaWMEareVkDahopmlNT+Cpsot8btPgsgBBApP9NiZj2Enwvh8rZN30ocQw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "^2.6.0",
|
"async": "^2.6.0",
|
||||||
"libp2p-crypto": "~0.12.1",
|
"libp2p-crypto": "~0.12.1",
|
||||||
@@ -12771,6 +12697,7 @@
|
|||||||
"version": "0.11.6",
|
"version": "0.11.6",
|
||||||
"resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/peer-info/-/peer-info-0.11.6.tgz",
|
||||||
"integrity": "sha512-xrVNiAF1IhVJNGEg5P2UQN+subaEkszT8YkC3zdy06MK0vTH3cMHB+HH+ZURkoSLssc3HbK58ecXeKpQ/4zq5w==",
|
"integrity": "sha512-xrVNiAF1IhVJNGEg5P2UQN+subaEkszT8YkC3zdy06MK0vTH3cMHB+HH+ZURkoSLssc3HbK58ecXeKpQ/4zq5w==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lodash.uniqby": "^4.7.0",
|
"lodash.uniqby": "^4.7.0",
|
||||||
"multiaddr": "^3.0.2",
|
"multiaddr": "^3.0.2",
|
||||||
@@ -12781,6 +12708,7 @@
|
|||||||
"version": "1.5.1",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-1.5.1.tgz",
|
||||||
"integrity": "sha1-eoY3/S9nqCflfAxC4cI8P9Us+wE=",
|
"integrity": "sha1-eoY3/S9nqCflfAxC4cI8P9Us+wE=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"asn1.js": "1.0.3"
|
"asn1.js": "1.0.3"
|
||||||
},
|
},
|
||||||
@@ -12789,6 +12717,7 @@
|
|||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-1.0.3.tgz",
|
||||||
"integrity": "sha1-KBuj7B8kSP52X5Kk7s+IP+E2S1Q=",
|
"integrity": "sha1-KBuj7B8kSP52X5Kk7s+IP+E2S1Q=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bn.js": "^1.0.0",
|
"bn.js": "^1.0.0",
|
||||||
"inherits": "^2.0.1",
|
"inherits": "^2.0.1",
|
||||||
@@ -12799,6 +12728,7 @@
|
|||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-1.3.0.tgz",
|
||||||
"integrity": "sha1-DbTL+W+PI7dC9by50ap6mZSgXoM=",
|
"integrity": "sha1-DbTL+W+PI7dC9by50ap6mZSgXoM=",
|
||||||
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12857,7 +12787,8 @@
|
|||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"promise": {
|
"promise": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
@@ -12935,7 +12866,8 @@
|
|||||||
"pseudomap": {
|
"pseudomap": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
|
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"psl": {
|
"psl": {
|
||||||
"version": "1.1.31",
|
"version": "1.1.31",
|
||||||
@@ -12965,7 +12897,8 @@
|
|||||||
"pull-pushable": {
|
"pull-pushable": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/pull-pushable/-/pull-pushable-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/pull-pushable/-/pull-pushable-2.2.0.tgz",
|
||||||
"integrity": "sha1-Xy867UethpGfAbEqLpnW8b13ZYE="
|
"integrity": "sha1-Xy867UethpGfAbEqLpnW8b13ZYE=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"pull-stream": {
|
"pull-stream": {
|
||||||
"version": "3.6.9",
|
"version": "3.6.9",
|
||||||
@@ -12982,7 +12915,6 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/pull-to-stream/-/pull-to-stream-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/pull-to-stream/-/pull-to-stream-0.1.0.tgz",
|
||||||
"integrity": "sha512-LMvdE0JwT7XQZMFjc7JDl/G9gmoZ8Zo8e86SG4ZZUcjuwvod803KxpAK8WrmdxzHsMRK9DETlIzuA0tbEVv6jg==",
|
"integrity": "sha512-LMvdE0JwT7XQZMFjc7JDl/G9gmoZ8Zo8e86SG4ZZUcjuwvod803KxpAK8WrmdxzHsMRK9DETlIzuA0tbEVv6jg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "^3.1.1"
|
"readable-stream": "^3.1.1"
|
||||||
},
|
},
|
||||||
@@ -12991,7 +12923,6 @@
|
|||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "^2.0.3",
|
"inherits": "^2.0.3",
|
||||||
"string_decoder": "^1.1.1",
|
"string_decoder": "^1.1.1",
|
||||||
@@ -13078,7 +13009,8 @@
|
|||||||
"punycode": {
|
"punycode": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz",
|
||||||
"integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0="
|
"integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.7.0",
|
"version": "6.7.0",
|
||||||
@@ -13226,6 +13158,7 @@
|
|||||||
"version": "2.3.6",
|
"version": "2.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
"inherits": "~2.0.3",
|
"inherits": "~2.0.3",
|
||||||
@@ -13890,6 +13823,7 @@
|
|||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz",
|
||||||
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
|
"integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"through2": "^2.0.2"
|
"through2": "^2.0.2"
|
||||||
}
|
}
|
||||||
@@ -13940,6 +13874,7 @@
|
|||||||
"version": "2.8.3",
|
"version": "2.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
|
||||||
"integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
|
"integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"builtin-status-codes": "^3.0.0",
|
"builtin-status-codes": "^3.0.0",
|
||||||
"inherits": "^2.0.1",
|
"inherits": "^2.0.1",
|
||||||
@@ -13975,7 +13910,8 @@
|
|||||||
"streamifier": {
|
"streamifier": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz",
|
||||||
"integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8="
|
"integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"strict-uri-encode": {
|
"strict-uri-encode": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -14175,6 +14111,7 @@
|
|||||||
"version": "1.6.2",
|
"version": "1.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
|
||||||
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
|
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"bl": "^1.0.0",
|
"bl": "^1.0.0",
|
||||||
"buffer-alloc": "^1.2.0",
|
"buffer-alloc": "^1.2.0",
|
||||||
@@ -14240,6 +14177,7 @@
|
|||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
|
||||||
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
|
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "~2.3.6",
|
"readable-stream": "~2.3.6",
|
||||||
"xtend": "~4.0.1"
|
"xtend": "~4.0.1"
|
||||||
@@ -14273,12 +14211,14 @@
|
|||||||
"to-arraybuffer": {
|
"to-arraybuffer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
|
||||||
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M="
|
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-buffer": {
|
"to-buffer": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
|
||||||
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
|
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-fast-properties": {
|
"to-fast-properties": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -14528,7 +14468,8 @@
|
|||||||
"typedarray": {
|
"typedarray": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"typedarray-to-buffer": {
|
"typedarray-to-buffer": {
|
||||||
"version": "3.1.5",
|
"version": "3.1.5",
|
||||||
@@ -14564,8 +14505,7 @@
|
|||||||
"unique-by": {
|
"unique-by": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unique-by/-/unique-by-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unique-by/-/unique-by-1.0.0.tgz",
|
||||||
"integrity": "sha1-UiDIa6e8Vy+3E610ZRRwy2RCEr0=",
|
"integrity": "sha1-UiDIa6e8Vy+3E610ZRRwy2RCEr0="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"universalify": {
|
"universalify": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
@@ -14690,7 +14630,6 @@
|
|||||||
"version": "0.9.10",
|
"version": "0.9.10",
|
||||||
"resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.9.10.tgz",
|
"resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.9.10.tgz",
|
||||||
"integrity": "sha512-RvEbhnxlggX4MXon7KQulTFiJQtLJZpSb9ZSa7ZTkOW0AzqiVTaLjI4vxaSzJBDH9dwZ3ltZadFiBaZslp6haA==",
|
"integrity": "sha512-RvEbhnxlggX4MXon7KQulTFiJQtLJZpSb9ZSa7ZTkOW0AzqiVTaLjI4vxaSzJBDH9dwZ3ltZadFiBaZslp6haA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"bindings": "^1.3.0",
|
"bindings": "^1.3.0",
|
||||||
"nan": "^2.11.1"
|
"nan": "^2.11.1"
|
||||||
@@ -15525,7 +15464,8 @@
|
|||||||
},
|
},
|
||||||
"webcrypto-shim": {
|
"webcrypto-shim": {
|
||||||
"version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8",
|
"version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8",
|
||||||
"from": "github:dignifiedquire/webcrypto-shim#master"
|
"from": "github:dignifiedquire/webcrypto-shim#master",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"websocket": {
|
"websocket": {
|
||||||
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
|
||||||
@@ -15663,7 +15603,8 @@
|
|||||||
"xtend": {
|
"xtend": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||||
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
|
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"y18n": {
|
"y18n": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
@@ -15680,7 +15621,8 @@
|
|||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||||
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
|
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "12.0.5",
|
"version": "12.0.5",
|
||||||
|
|||||||
15
package.json
15
package.json
@@ -1,21 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "kredits-contracts",
|
"name": "kredits-contracts",
|
||||||
"version": "3.0.2",
|
"version": "4.0.2",
|
||||||
"description": "Ethereum contracts and npm wrapper for Kredits",
|
"description": "Ethereum contracts and npm wrapper for Kredits",
|
||||||
"main": "./lib/kredits.js",
|
"main": "./lib/kredits.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"install-all": "./scripts/every-app.sh \"npm install\"",
|
||||||
"build-json": "npm run compile-contracts && node ./scripts/build-json.js",
|
"build-json": "npm run compile-contracts && node ./scripts/build-json.js",
|
||||||
"repl": "truffle exec scripts/repl.js",
|
"repl": "truffle exec scripts/repl.js",
|
||||||
"seeds": "truffle exec scripts/seeds.js",
|
"seeds": "truffle exec scripts/seeds.js",
|
||||||
"compile-contracts": "aragon contracts compile --all",
|
"compile-contracts": "aragon contracts compile --all",
|
||||||
"bootstrap": "npm run reset && truffle exec scripts/seeds.js",
|
"bootstrap": "npm run reset:hard && npm run seeds",
|
||||||
"reset": "npm run deploy:apps && npm run deploy:kit && npm run deploy:dao",
|
"reset": "npm run deploy:kit && npm run deploy:dao",
|
||||||
"deploy:kit": "npm run compile-contracts && ENS=0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1 aragon contracts exec scripts/deploy-kit.js",
|
"reset:hard": "npm run deploy:apps && npm run reset",
|
||||||
|
"deploy:kit": "npm run compile-contracts && aragon contracts exec scripts/deploy-kit.js",
|
||||||
"deploy:dao": "aragon contracts exec scripts/new-dao.js",
|
"deploy:dao": "aragon contracts exec scripts/new-dao.js",
|
||||||
"deploy:apps": "./scripts/deploy-apps.sh",
|
"deploy:apps": "./scripts/every-app.sh \"aragon apm publish major\"",
|
||||||
"devchain": "aragon devchain --port 7545",
|
"devchain": "aragon devchain --port 7545",
|
||||||
"dao:address": "truffle exec scripts/current-address.js",
|
"dao:address": "truffle exec scripts/current-address.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
@@ -41,9 +43,8 @@
|
|||||||
"solc": "^0.4.25"
|
"solc": "^0.4.25"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"eth-ens-namehash": "^2.0.8",
|
|
||||||
"ethers": "^4.0.27",
|
"ethers": "^4.0.27",
|
||||||
"ipfs-api": "^19.0.0",
|
"ipfs-http-client": "^30.1.1",
|
||||||
"rsvp": "^4.8.2"
|
"rsvp": "^4.8.2"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ module.exports = async function(callback) {
|
|||||||
console.log(`Creating a contribution for contributor account ${contributorAccount} ID: ${contributorId}`);
|
console.log(`Creating a contribution for contributor account ${contributorAccount} ID: ${contributorId}`);
|
||||||
|
|
||||||
let contributionAttributes = {
|
let contributionAttributes = {
|
||||||
contributorAccount,
|
contributorId,
|
||||||
amount: await promptly.prompt('Amount: '),
|
amount: await promptly.prompt('Amount: '),
|
||||||
description: await promptly.prompt('Description: '),
|
description: await promptly.prompt('Description: '),
|
||||||
kind: await promptly.prompt('Kind: ', { default: 'dev' }),
|
kind: await promptly.prompt('Kind: ', { default: 'dev' }),
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ module.exports = async function(callback) {
|
|||||||
let contributorAttributes = {
|
let contributorAttributes = {
|
||||||
account: await prompt('Contributor address: ', {}),
|
account: await prompt('Contributor address: ', {}),
|
||||||
name: await prompt('Name: '),
|
name: await prompt('Name: '),
|
||||||
isCore: await prompt('core? y/n') === 'y',
|
|
||||||
kind: await prompt('Kind (default person): ', {default: 'person'}),
|
kind: await prompt('Kind (default person): ', {default: 'person'}),
|
||||||
url: await prompt('URL: '),
|
url: await prompt('URL: '),
|
||||||
github_username: await prompt('GitHub username: '),
|
github_username: await prompt('GitHub username: '),
|
||||||
@@ -34,7 +33,7 @@ module.exports = async function(callback) {
|
|||||||
console.log("\nAdding contributor:");
|
console.log("\nAdding contributor:");
|
||||||
console.log(contributorAttributes);
|
console.log(contributorAttributes);
|
||||||
|
|
||||||
kredits.Contributor.add(contributorAttributes, { gasLimit: 250000 }).then((result) => {
|
kredits.Contributor.add(contributorAttributes, { gasLimit: 350000 }).then((result) => {
|
||||||
console.log("\n\nResult:");
|
console.log("\n\nResult:");
|
||||||
console.log(result);
|
console.log(result);
|
||||||
callback();
|
callback();
|
||||||
|
|||||||
363
scripts/deploy-apm.js
Normal file
363
scripts/deploy-apm.js
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
const namehash = require('eth-ens-namehash').hash
|
||||||
|
const keccak256 = require('js-sha3').keccak_256
|
||||||
|
|
||||||
|
const deployENS = require('@aragon/os/scripts/deploy-test-ens')
|
||||||
|
const deployDaoFactory = require('@aragon/os/scripts/deploy-daofactory')
|
||||||
|
const logDeploy = require('@aragon/os/scripts//helpers/deploy-logger')
|
||||||
|
const getAccounts = require('@aragon/os/scripts//helpers/get-accounts')
|
||||||
|
|
||||||
|
const globalArtifacts = this.artifacts // Not injected unless called directly via truffle
|
||||||
|
const globalWeb3 = this.web3 // Not injected unless called directly via truffle
|
||||||
|
|
||||||
|
const ZERO_ADDR = '0x0000000000000000000000000000000000000000'
|
||||||
|
|
||||||
|
const defaultOwner = process.env.OWNER
|
||||||
|
const defaultDaoFactoryAddress = process.env.DAO_FACTORY
|
||||||
|
const defaultENSAddress = process.env.ENS
|
||||||
|
|
||||||
|
module.exports = async (
|
||||||
|
truffleExecCallback,
|
||||||
|
{
|
||||||
|
artifacts = globalArtifacts,
|
||||||
|
web3 = globalWeb3,
|
||||||
|
ensAddress = defaultENSAddress,
|
||||||
|
owner = defaultOwner,
|
||||||
|
daoFactoryAddress = defaultDaoFactoryAddress,
|
||||||
|
verbose = true
|
||||||
|
} = {}
|
||||||
|
) => {
|
||||||
|
const log = (...args) => {
|
||||||
|
if (verbose) { console.log(...args) }
|
||||||
|
}
|
||||||
|
|
||||||
|
const APMRegistry = artifacts.require('APMRegistry')
|
||||||
|
const Repo = artifacts.require('Repo')
|
||||||
|
const ENSSubdomainRegistrar = artifacts.require('ENSSubdomainRegistrar')
|
||||||
|
|
||||||
|
const DAOFactory = artifacts.require('DAOFactory')
|
||||||
|
const APMRegistryFactory = artifacts.require('APMRegistryFactory')
|
||||||
|
const ENS = artifacts.require('ENS')
|
||||||
|
|
||||||
|
const Kernel = artifacts.require('Kernel')
|
||||||
|
const ACL = artifacts.require('ACL')
|
||||||
|
|
||||||
|
const tldName = 'eth'
|
||||||
|
const labelName = 'aragonpm'
|
||||||
|
const tldHash = namehash(tldName)
|
||||||
|
const labelHash = '0x'+keccak256(labelName)
|
||||||
|
const apmNode = namehash(`${labelName}.${tldName}`)
|
||||||
|
|
||||||
|
let ens
|
||||||
|
|
||||||
|
log('Deploying APM...')
|
||||||
|
|
||||||
|
const accounts = await getAccounts(web3)
|
||||||
|
if (!owner) {
|
||||||
|
owner = accounts[0]
|
||||||
|
log('OWNER env variable not found, setting APM owner to the provider\'s first account')
|
||||||
|
}
|
||||||
|
log('Owner:', owner)
|
||||||
|
|
||||||
|
if (!ensAddress) {
|
||||||
|
log('=========')
|
||||||
|
log('Missing ENS! Deploying a custom ENS...')
|
||||||
|
ens = (await deployENS(null, { artifacts, owner, verbose: false })).ens
|
||||||
|
ensAddress = ens.address
|
||||||
|
} else {
|
||||||
|
ens = ENS.at(ensAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
log('ENS:', ensAddress)
|
||||||
|
log(`TLD: ${tldName} (${tldHash})`)
|
||||||
|
log(`Label: ${labelName} (${labelHash})`)
|
||||||
|
log(`apmNode: ${apmNode}`)
|
||||||
|
|
||||||
|
log('=========')
|
||||||
|
log('Deploying APM bases...')
|
||||||
|
|
||||||
|
const apmRegistryBase = await APMRegistry.new()
|
||||||
|
await logDeploy(apmRegistryBase, { verbose })
|
||||||
|
const apmRepoBase = await Repo.new()
|
||||||
|
await logDeploy(apmRepoBase, { verbose })
|
||||||
|
const ensSubdomainRegistrarBase = await ENSSubdomainRegistrar.new()
|
||||||
|
await logDeploy(ensSubdomainRegistrarBase, { verbose })
|
||||||
|
|
||||||
|
let daoFactory
|
||||||
|
if (daoFactoryAddress) {
|
||||||
|
daoFactory = DAOFactory.at(daoFactoryAddress)
|
||||||
|
const hasEVMScripts = await daoFactory.regFactory() !== ZERO_ADDR
|
||||||
|
|
||||||
|
log(`Using provided DAOFactory (with${hasEVMScripts ? '' : 'out' } EVMScripts):`, daoFactoryAddress)
|
||||||
|
} else {
|
||||||
|
log('Deploying DAOFactory with EVMScripts...')
|
||||||
|
daoFactory = (await deployDaoFactory(null, { artifacts, withEvmScriptRegistryFactory: true, verbose: false })).daoFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
log('Deploying APMRegistryFactory...')
|
||||||
|
const apmFactory = await APMRegistryFactory.new(
|
||||||
|
daoFactory.address,
|
||||||
|
apmRegistryBase.address,
|
||||||
|
apmRepoBase.address,
|
||||||
|
ensSubdomainRegistrarBase.address,
|
||||||
|
ensAddress,
|
||||||
|
'0x00'
|
||||||
|
)
|
||||||
|
await logDeploy(apmFactory, { verbose })
|
||||||
|
|
||||||
|
|
||||||
|
log(`Assigning ENS name (${labelName}.${tldName}) to factory... ${apmFactory.address}`)
|
||||||
|
|
||||||
|
if (await ens.owner(apmNode) === accounts[0]) {
|
||||||
|
log('Transferring name ownership from deployer to APMRegistryFactory')
|
||||||
|
await ens.setOwner(apmNode, apmFactory.address)
|
||||||
|
} else {
|
||||||
|
log('Creating subdomain and assigning it to APMRegistryFactory')
|
||||||
|
try {
|
||||||
|
await ens.setSubnodeOwner(tldHash, labelHash, apmFactory.address)
|
||||||
|
//await ens.setSubnodeOwner(apmNode, keccak256('open'), apmFactory.address)
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
console.error(
|
||||||
|
`Error: could not set the owner of '${labelName}.${tldName}' on the given ENS instance`,
|
||||||
|
`(${ensAddress}). Make sure you have ownership rights over the subdomain.`
|
||||||
|
)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log('Deploying APM...')
|
||||||
|
const receipt = await apmFactory.newAPM(tldHash, labelHash, owner)
|
||||||
|
|
||||||
|
log('=========')
|
||||||
|
const apmAddr = receipt.logs.filter(l => l.event == 'DeployAPM')[0].args.apm
|
||||||
|
console.log(receipt.logs);
|
||||||
|
const apmDAO = APMRegistry.at(apmAddr);
|
||||||
|
|
||||||
|
log('Address:', apmAddr)
|
||||||
|
log('Transaction hash:', receipt.tx)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
log('Deploying subdomain APM bases...')
|
||||||
|
|
||||||
|
const subApmRegistryBase = await APMRegistry.new()
|
||||||
|
await logDeploy(subApmRegistryBase, { verbose })
|
||||||
|
const subApmRepoBase = await Repo.new()
|
||||||
|
await logDeploy(subApmRepoBase, { verbose })
|
||||||
|
const subEnsSubdomainRegistrarBase = await ENSSubdomainRegistrar.new()
|
||||||
|
await logDeploy(subEnsSubdomainRegistrarBase, { verbose })
|
||||||
|
|
||||||
|
log('Deploying APMRegistryFactory...')
|
||||||
|
const subApmFactory = await APMRegistryFactory.new(
|
||||||
|
daoFactory.address,
|
||||||
|
subApmRegistryBase.address,
|
||||||
|
subApmRepoBase.address,
|
||||||
|
subEnsSubdomainRegistrarBase.address,
|
||||||
|
ensAddress,
|
||||||
|
'0x00'
|
||||||
|
)
|
||||||
|
await logDeploy(subApmFactory, { verbose })
|
||||||
|
|
||||||
|
|
||||||
|
const kernelAddr = await apmDAO.kernel();
|
||||||
|
console.log(kernelAddr);
|
||||||
|
const aclAddr = await Kernel.at(kernelAddr).acl();
|
||||||
|
const acl = ACL.at(aclAddr);
|
||||||
|
|
||||||
|
const role = await ensSubdomainRegistrarBase.CREATE_NAME_ROLE();
|
||||||
|
const registrarAddr = await apmDAO.registrar();
|
||||||
|
const registrar = ENSSubdomainRegistrar.at(registrarAddr);
|
||||||
|
|
||||||
|
console.log(owner, registrarAddr, role);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await acl.grantPermission(owner, registrarAddr, role);
|
||||||
|
|
||||||
|
log('Deploying subdomain APM...')
|
||||||
|
|
||||||
|
console.log(await acl.hasPermission(owner, registrar.address, role))
|
||||||
|
console.log(subApmFactory.address)
|
||||||
|
await registrar.createNameAndPoint(namehash('open'), subApmFactory.address)
|
||||||
|
|
||||||
|
const subReceipt = await subApmFactory.newAPM(namehash('aragonpm.eth'), namehash('open'), owner)
|
||||||
|
|
||||||
|
log('=========')
|
||||||
|
const subApmAddr = subReceipt.logs.filter(l => l.event == 'DeployAPM')[0].args.apm
|
||||||
|
console.log(subReceipt.logs);
|
||||||
|
console.log(subApmAddr);
|
||||||
|
|
||||||
|
} catch(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof truffleExecCallback === 'function') {
|
||||||
|
// Called directly via `truffle exec`
|
||||||
|
truffleExecCallback()
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
apmFactory,
|
||||||
|
ens,
|
||||||
|
apm: APMRegistry.at(apmAddr),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
"
|
||||||
|
|
||||||
|
const namehash = require('eth-ens-namehash').hash
|
||||||
|
const keccak256 = require('js-sha3').keccak_256
|
||||||
|
|
||||||
|
const deployENS = require('@aragon/os/scripts/deploy-test-ens')
|
||||||
|
const deployDaoFactory = require('@aragon/os/scripts/deploy-daofactory')
|
||||||
|
const logDeploy = require('@aragon/os/scripts//helpers/deploy-logger')
|
||||||
|
const getAccounts = require('@aragon/os/scripts//helpers/get-accounts')
|
||||||
|
|
||||||
|
const globalArtifacts = this.artifacts // Not injected unless called directly via truffle
|
||||||
|
const globalWeb3 = this.web3 // Not injected unless called directly via truffle
|
||||||
|
|
||||||
|
const ZERO_ADDR = '0x0000000000000000000000000000000000000000'
|
||||||
|
|
||||||
|
const defaultOwner = process.env.OWNER
|
||||||
|
const defaultDaoFactoryAddress = process.env.DAO_FACTORY
|
||||||
|
const defaultENSAddress = process.env.ENS
|
||||||
|
|
||||||
|
module.exports = async (
|
||||||
|
truffleExecCallback,
|
||||||
|
{
|
||||||
|
artifacts = globalArtifacts,
|
||||||
|
web3 = globalWeb3,
|
||||||
|
ensAddress = defaultENSAddress,
|
||||||
|
owner = defaultOwner,
|
||||||
|
daoFactoryAddress = defaultDaoFactoryAddress,
|
||||||
|
verbose = true
|
||||||
|
} = {}
|
||||||
|
) => {
|
||||||
|
const log = (...args) => {
|
||||||
|
if (verbose) { console.log(...args) }
|
||||||
|
}
|
||||||
|
|
||||||
|
const APMRegistry = artifacts.require('APMRegistry')
|
||||||
|
const Repo = artifacts.require('Repo')
|
||||||
|
const ENSSubdomainRegistrar = artifacts.require('ENSSubdomainRegistrar')
|
||||||
|
|
||||||
|
const DAOFactory = artifacts.require('DAOFactory')
|
||||||
|
const APMRegistryFactory = artifacts.require('APMRegistryFactory')
|
||||||
|
const ENS = artifacts.require('ENS')
|
||||||
|
|
||||||
|
const tldName = 'eth'
|
||||||
|
const labelName = 'open.aragonpm'
|
||||||
|
const tldHash = namehash(tldName)
|
||||||
|
const labelHash = '0x'+keccak256(labelName)
|
||||||
|
const apmNode = namehash(`${labelName}.${tldName}`)
|
||||||
|
|
||||||
|
let ens
|
||||||
|
|
||||||
|
log('Deploying APM...')
|
||||||
|
|
||||||
|
const accounts = await getAccounts(web3)
|
||||||
|
if (!owner) {
|
||||||
|
owner = accounts[0]
|
||||||
|
log('OWNER env variable not found, setting APM owner to the provider\'s first account')
|
||||||
|
}
|
||||||
|
log('Owner:', owner)
|
||||||
|
|
||||||
|
if (!ensAddress) {
|
||||||
|
log('=========')
|
||||||
|
log('Missing ENS! Deploying a custom ENS...')
|
||||||
|
ens = (await deployENS(null, { artifacts, owner, verbose: false })).ens
|
||||||
|
ensAddress = ens.address
|
||||||
|
} else {
|
||||||
|
ens = ENS.at(ensAddress)
|
||||||
|
}
|
||||||
|
|
||||||
|
log('ENS:', ensAddress)
|
||||||
|
log(`TLD: ${tldName} (${tldHash})`)
|
||||||
|
log(`Label: ${labelName} (${labelHash})`)
|
||||||
|
|
||||||
|
log('=========')
|
||||||
|
log('Deploying APM bases...')
|
||||||
|
|
||||||
|
const apmRegistryBase = await APMRegistry.new()
|
||||||
|
await logDeploy(apmRegistryBase, { verbose })
|
||||||
|
const apmRepoBase = await Repo.new()
|
||||||
|
await logDeploy(apmRepoBase, { verbose })
|
||||||
|
const ensSubdomainRegistrarBase = await ENSSubdomainRegistrar.new()
|
||||||
|
await logDeploy(ensSubdomainRegistrarBase, { verbose })
|
||||||
|
|
||||||
|
let daoFactory
|
||||||
|
if (daoFactoryAddress) {
|
||||||
|
daoFactory = DAOFactory.at(daoFactoryAddress)
|
||||||
|
const hasEVMScripts = await daoFactory.regFactory() !== ZERO_ADDR
|
||||||
|
|
||||||
|
log(`Using provided DAOFactory (with${hasEVMScripts ? '' : 'out' } EVMScripts):`, daoFactoryAddress)
|
||||||
|
} else {
|
||||||
|
log('Deploying DAOFactory with EVMScripts...')
|
||||||
|
daoFactory = (await deployDaoFactory(null, { artifacts, withEvmScriptRegistryFactory: true, verbose: false })).daoFactory
|
||||||
|
}
|
||||||
|
|
||||||
|
log('Deploying APMRegistryFactory...')
|
||||||
|
const apmFactory = await APMRegistryFactory.new(
|
||||||
|
daoFactory.address,
|
||||||
|
apmRegistryBase.address,
|
||||||
|
apmRepoBase.address,
|
||||||
|
ensSubdomainRegistrarBase.address,
|
||||||
|
ensAddress,
|
||||||
|
'0x00'
|
||||||
|
)
|
||||||
|
await logDeploy(apmFactory, { verbose })
|
||||||
|
|
||||||
|
log(`Assigning ENS name (${labelName}.${tldName}) to factory...`)
|
||||||
|
|
||||||
|
if (await ens.owner(apmNode) === accounts[0]) {
|
||||||
|
log('Transferring name ownership from deployer to APMRegistryFactory')
|
||||||
|
await ens.setOwner(apmNode, apmFactory.address)
|
||||||
|
} else {
|
||||||
|
log('Creating subdomain and assigning it to APMRegistryFactory')
|
||||||
|
try {
|
||||||
|
await ens.setSubnodeOwner(tldHash, labelHash, apmFactory.address)
|
||||||
|
} catch (err) {
|
||||||
|
console.error(
|
||||||
|
`Error: could not set the owner of '${labelName}.${tldName}' on the given ENS instance`,
|
||||||
|
`(${ensAddress}). Make sure you have ownership rights over the subdomain.`
|
||||||
|
)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
log('Deploying APM...')
|
||||||
|
const receipt = await apmFactory.newAPM(tldHash, labelHash, owner)
|
||||||
|
|
||||||
|
log('=========')
|
||||||
|
const apmAddr = receipt.logs.filter(l => l.event == 'DeployAPM')[0].args.apm
|
||||||
|
log('# APM:')
|
||||||
|
log('Address:', apmAddr)
|
||||||
|
log('Transaction hash:', receipt.tx)
|
||||||
|
log('=========')
|
||||||
|
|
||||||
|
try {
|
||||||
|
const kernel = await ensSubdomainRegistrarBase.kernel();
|
||||||
|
const acl = await kernel.acl();
|
||||||
|
console.log(acl);
|
||||||
|
let ret = await ensSubdomainRegistrarBase.createNameAndPoint(labelHash, apmAddr).then(console.log).catch(console.log);
|
||||||
|
console.log(ret);
|
||||||
|
} catch(e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (typeof truffleExecCallback === 'function') {
|
||||||
|
// Called directly via `truffle exec`
|
||||||
|
truffleExecCallback()
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
apmFactory,
|
||||||
|
ens,
|
||||||
|
apm: APMRegistry.at(apmAddr),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
@@ -10,13 +10,7 @@ echo "Setting up each aragon app in ./apps"
|
|||||||
echo "a new app version will be deployed"
|
echo "a new app version will be deployed"
|
||||||
echo "----"
|
echo "----"
|
||||||
|
|
||||||
for dir in ./apps/*/; do
|
./scripts/every-app.sh "npm install"
|
||||||
set -x
|
./scripts/every-app.sh "aragon apm publish major"
|
||||||
cd $dir
|
|
||||||
npm install
|
|
||||||
aragon apm publish major
|
|
||||||
cd $rootDir
|
|
||||||
set +x
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Done, new versions of all apps deployed"
|
echo "Done, new versions of all apps deployed"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const deployDAOFactory = require('@aragon/os/scripts/deploy-daofactory.js')
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const argv = require('yargs').argv
|
const argv = require('yargs').argv
|
||||||
const namehash = require('eth-ens-namehash').hash
|
const namehash = require('ethers').utils.namehash;
|
||||||
|
|
||||||
const fileInject = require('./helpers/file_inject.js')
|
const fileInject = require('./helpers/file_inject.js')
|
||||||
const getNetworkId = require('./helpers/networkid.js')
|
const getNetworkId = require('./helpers/networkid.js')
|
||||||
|
|||||||
14
scripts/every-app.sh
Executable file
14
scripts/every-app.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rootDir=`pwd`
|
||||||
|
|
||||||
|
for dir in ./apps/*/; do
|
||||||
|
set -x
|
||||||
|
cd $dir
|
||||||
|
eval $1
|
||||||
|
cd $rootDir
|
||||||
|
set +x
|
||||||
|
done
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ module.exports = async function(web3) {
|
|||||||
});
|
});
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(`Signer account not available; readonly connection (${e.message}`);
|
console.log(`Signer account not available; readonly connection (${e.message}`);
|
||||||
new Kredits(provider, null).init().then(kredits => {
|
new Kredits(provider, null, { apm }).init().then(kredits => {
|
||||||
resolve(kredits);
|
resolve(kredits);
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
reject(e);
|
reject(e);
|
||||||
|
|||||||
@@ -14,23 +14,32 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
console.log(`Using Contribution at: ${kredits.Contribution.contract.address}`);
|
console.log(`Using Contribution at: ${kredits.Contribution.contract.address}`);
|
||||||
|
|
||||||
|
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
head: ['ID', 'Contributor account', 'Amount', 'Claimed?', 'Vetoed?', 'Description']
|
head: ['ID', 'Contributor ID', 'Description', 'Amount', 'Confirmed?', 'Vetoed?', 'Claimed?']
|
||||||
})
|
})
|
||||||
|
|
||||||
let contributions = await kredits.Contribution.all()
|
try {
|
||||||
|
let blockNumber = await kredits.provider.getBlockNumber();
|
||||||
|
let contributions = await kredits.Contribution.all();
|
||||||
|
|
||||||
contributions.forEach((c) => {
|
contributions.forEach((c) => {
|
||||||
table.push([
|
const confirmed = c.confirmedAtBlock <= blockNumber;
|
||||||
c.id.toString(),
|
|
||||||
c.contributor,
|
table.push([
|
||||||
c.amount.toString(),
|
c.id.toString(),
|
||||||
c.claimed,
|
c.contributorId,
|
||||||
c.vetoed,
|
`${c.description}`,
|
||||||
`${c.description}`
|
c.amount.toString(),
|
||||||
])
|
confirmed,
|
||||||
})
|
c.vetoed,
|
||||||
console.log(table.toString())
|
c.claimed,
|
||||||
callback()
|
])
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(table.toString());
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
callback();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const promptly = require('promptly');
|
const promptly = require('promptly');
|
||||||
const Table = require('cli-table');
|
const Table = require('cli-table');
|
||||||
|
const ethers = require('ethers');
|
||||||
|
|
||||||
const initKredits = require('./helpers/init_kredits.js');
|
const initKredits = require('./helpers/init_kredits.js');
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
|
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
head: ['ID', 'Account', 'Core?', 'Name']
|
head: ['ID', 'Account', 'Core?', 'Name', 'Balance']
|
||||||
})
|
})
|
||||||
|
|
||||||
let contributors = await kredits.Contributor.all()
|
let contributors = await kredits.Contributor.all()
|
||||||
@@ -26,7 +27,8 @@ module.exports = async function(callback) {
|
|||||||
c.id.toString(),
|
c.id.toString(),
|
||||||
c.account,
|
c.account,
|
||||||
c.isCore,
|
c.isCore,
|
||||||
`${c.name}`
|
`${c.name}`,
|
||||||
|
ethers.utils.formatEther(c.balance)
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
console.log(table.toString())
|
console.log(table.toString())
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ module.exports = async function(callback) {
|
|||||||
|
|
||||||
console.log(`Using Proposal at: ${kredits.Proposal.contract.address}`);
|
console.log(`Using Proposal at: ${kredits.Proposal.contract.address}`);
|
||||||
|
|
||||||
|
|
||||||
const table = new Table({
|
const table = new Table({
|
||||||
head: ['ID', 'Contributor ID', 'Amount', 'Votes', 'Executed?', 'Description']
|
head: ['ID', 'Contributor ID', 'Amount', 'Votes', 'Executed?', 'Description']
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ module.exports = async function(callback) {
|
|||||||
console.log(`[OK] kredits.${contractName}.${method}(${JSON.stringify(args)}) => ${result.hash}`);
|
console.log(`[OK] kredits.${contractName}.${method}(${JSON.stringify(args)}) => ${result.hash}`);
|
||||||
next();
|
next();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(`[FAILD] kredits.${contractName}.${method}(${JSON.stringify(args)})`);
|
console.log(`[FAILED] kredits.${contractName}.${method}(${JSON.stringify(args)})`);
|
||||||
callback(error)
|
console.log(`Error: ${error.message}`);
|
||||||
|
next();
|
||||||
});
|
});
|
||||||
}, () => { console.log("\nDone!") });
|
}, () => { console.log("\nDone!") });
|
||||||
|
|
||||||
|
|||||||
23
scripts/upgrade.sh
Executable file
23
scripts/upgrade.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rootDir=`pwd`
|
||||||
|
|
||||||
|
app=$1
|
||||||
|
daoAddress=$2
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
daoAddress=$KREDITS_DAO_ADDRESS
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "## Deploying $app for $daoAddress"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
cd "apps/$app"
|
||||||
|
aragon apm publish major
|
||||||
|
cd $rootDir
|
||||||
|
aragon dao upgrade $daoAddress kredits-$app
|
||||||
|
npm run build-json
|
||||||
|
set +x
|
||||||
|
|
||||||
|
echo "Done"
|
||||||
@@ -28,7 +28,7 @@ const providerForNetwork = (network) => (
|
|||||||
let [first, ...rest] = network;
|
let [first, ...rest] = network;
|
||||||
preset = `infura${first.toUpperCase()}${rest.join('')}`;
|
preset = `infura${first.toUpperCase()}${rest.join('')}`;
|
||||||
}
|
}
|
||||||
return provider('frame', 'local', preset);
|
return provider(['frame', 'local', preset]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user