@devprtcl/protocol
Advanced tools
Comparing version 0.2.0 to 2.0.0
#!/usr/bin/env node | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
@@ -20,3 +32,3 @@ }; | ||
ETHEREUM_MOCK_HOST: host, | ||
ETHEREUM_MOCK_PORT: port | ||
ETHEREUM_MOCK_PORT: port, | ||
}; | ||
@@ -23,0 +35,0 @@ shelljs_1.exec('npx truffle compile', { env }); |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -3,0 +3,0 @@ return |
@@ -13,3 +13,3 @@ "use strict"; | ||
deployer.deploy(artifacts.require('Allocator'), address); | ||
deployer.deploy(artifacts.require('AllocatorStorage'), address); | ||
deployer.deploy(artifacts.require('AllocatorStorage')); | ||
// Dev | ||
@@ -20,3 +20,2 @@ deployer.deploy(artifacts.require('Dev'), address); | ||
deployer.deploy(artifacts.require('Lockup'), address); | ||
deployer.deploy(artifacts.require('LockupStorage'), address); | ||
// Market | ||
@@ -37,5 +36,2 @@ deployer.deploy(artifacts.require('MarketFactory'), address); | ||
deployer.deploy(artifacts.require('VoteCounter'), address); | ||
deployer.deploy(artifacts.require('VoteCounterStorage'), address); | ||
deployer.deploy(artifacts.require('VoteTimes'), address); | ||
deployer.deploy(artifacts.require('VoteTimesStorage'), address); | ||
// Withdraw | ||
@@ -42,0 +38,0 @@ deployer.link(decimals, artifacts.require('Withdraw')); |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -15,3 +15,3 @@ return | ||
deployer.deploy(artifacts.require('Allocator'), address) | ||
deployer.deploy(artifacts.require('AllocatorStorage'), address) | ||
deployer.deploy(artifacts.require('AllocatorStorage')) | ||
@@ -24,3 +24,2 @@ // Dev | ||
deployer.deploy(artifacts.require('Lockup'), address) | ||
deployer.deploy(artifacts.require('LockupStorage'), address) | ||
@@ -46,5 +45,2 @@ // Market | ||
deployer.deploy(artifacts.require('VoteCounter'), address) | ||
deployer.deploy(artifacts.require('VoteCounterStorage'), address) | ||
deployer.deploy(artifacts.require('VoteTimes'), address) | ||
deployer.deploy(artifacts.require('VoteTimesStorage'), address) | ||
@@ -51,0 +47,0 @@ // Withdraw |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -3,0 +3,0 @@ return |
@@ -69,3 +69,3 @@ "use strict"; | ||
addressConfig.setWithdrawStorage(withdrawStorage.address), | ||
addressConfig.setToken(token.address) | ||
addressConfig.setToken(token.address), | ||
]); | ||
@@ -85,3 +85,3 @@ })) | ||
voteTimesStorage.deployed(), | ||
withdrawStorage.deployed() | ||
withdrawStorage.deployed(), | ||
]); | ||
@@ -95,3 +95,3 @@ })) | ||
}) | ||
.catch(err => { | ||
.catch((err) => { | ||
console.error('*** ERROR! ***', err); | ||
@@ -98,0 +98,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -47,3 +47,3 @@ return | ||
}) | ||
.then(async addressConfig => { | ||
.then(async (addressConfig) => { | ||
return Promise.all([ | ||
@@ -69,3 +69,3 @@ addressConfig.setAllocator(allocator.address), | ||
addressConfig.setWithdrawStorage(withdrawStorage.address), | ||
addressConfig.setToken(token.address) | ||
addressConfig.setToken(token.address), | ||
]) | ||
@@ -86,7 +86,7 @@ }) | ||
voteTimesStorage.deployed(), | ||
withdrawStorage.deployed() | ||
withdrawStorage.deployed(), | ||
]) | ||
}) | ||
.then(async storages => { | ||
return Promise.all(storages.map(async x => x.createStorage())) | ||
.then(async (storages) => { | ||
return Promise.all(storages.map(async (x) => x.createStorage())) | ||
}) | ||
@@ -98,3 +98,3 @@ .then(() => { | ||
}) | ||
.catch(err => { | ||
.catch((err) => { | ||
console.error('*** ERROR! ***', err) | ||
@@ -101,0 +101,0 @@ }) |
const legacy = '0x98626e2c9231f03504273d55f397409defd4a093' | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -5,0 +5,0 @@ return |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network !== 'mock') { | ||
@@ -3,0 +3,0 @@ return |
@@ -26,3 +26,3 @@ "use strict"; | ||
dev.addMinter(lockup.address), | ||
dev.addMinter(withdraw.address) | ||
dev.addMinter(withdraw.address), | ||
]); | ||
@@ -33,3 +33,3 @@ })) | ||
}) | ||
.catch(err => { | ||
.catch((err) => { | ||
console.error('*** ERROR! ***', err); | ||
@@ -36,0 +36,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
const handler = function(deployer, network) { | ||
const handler = function (deployer, network) { | ||
if (network === 'test') { | ||
@@ -13,7 +13,7 @@ return | ||
}) | ||
.then(async dev => { | ||
.then(async (dev) => { | ||
return Promise.all([ | ||
dev.addMinter(devMigration.address), | ||
dev.addMinter(lockup.address), | ||
dev.addMinter(withdraw.address) | ||
dev.addMinter(withdraw.address), | ||
]) | ||
@@ -26,3 +26,3 @@ }) | ||
}) | ||
.catch(err => { | ||
.catch((err) => { | ||
console.error('*** ERROR! ***', err) | ||
@@ -29,0 +29,0 @@ }) |
@@ -8,3 +8,3 @@ import {createPolicy} from './mock/policy' | ||
const handler = async function(deployer, network) { | ||
const handler = async function (deployer, network) { | ||
if (network !== 'mock') { | ||
@@ -11,0 +11,0 @@ return |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createInstanceByAddress = exports.createInstance = void 0; | ||
function createInstance(name, artifacts) { | ||
@@ -14,0 +15,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.lockup = void 0; | ||
const common_1 = require("./common"); | ||
@@ -17,0 +18,0 @@ const bignumber_js_1 = __importDefault(require("bignumber.js")); |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createMarket = void 0; | ||
const common_1 = require("./common"); | ||
@@ -52,5 +53,8 @@ function createMarket(artifacts, addressInfo) { | ||
const market = yield common_1.createInstanceByAddress('Market', marketAddresses[marketIndex], artifacts); | ||
yield market.vote(addressInfo[0].property, true, { | ||
from: addressInfo[0].account | ||
}); | ||
// I commented out to get the compilation through. | ||
// I'm deleting this source itself, so I'll leave it as is. | ||
// | ||
// await market.vote(addressInfo[0].property!, true, { | ||
// from: addressInfo[0].account, | ||
// }) | ||
const result = yield market.enabled(); | ||
@@ -57,0 +61,0 @@ console.log( |
@@ -6,3 +6,3 @@ import { | ||
MarketTest2Instance, | ||
MarketTest3Instance | ||
MarketTest3Instance, | ||
} from '../../types/truffle-contracts' | ||
@@ -65,5 +65,8 @@ import {createInstance, AddressInfo, createInstanceByAddress} from './common' | ||
) | ||
await market.vote(addressInfo[0].property!, true, { | ||
from: addressInfo[0].account | ||
}) | ||
// I commented out to get the compilation through. | ||
// I'm deleting this source itself, so I'll leave it as is. | ||
// | ||
// await market.vote(addressInfo[0].property!, true, { | ||
// from: addressInfo[0].account, | ||
// }) | ||
const result = await market.enabled() | ||
@@ -70,0 +73,0 @@ console.log( |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createMetrics = void 0; | ||
const common_1 = require("./common"); | ||
@@ -23,3 +24,3 @@ function createMetrics(artifacts, addressInfo, marketAddresses) { | ||
yield dev.approve(market.address, balance, { | ||
from: addressInfo[accountIndex].account | ||
from: addressInfo[accountIndex].account, | ||
}); | ||
@@ -26,0 +27,0 @@ yield market.authenticate(addressInfo[accountIndex].property, 'arg1' + idIndex.toString(), 'arg2', 'arg3', 'arg4', 'arg5', { from: addressInfo[accountIndex].account }); |
@@ -22,3 +22,3 @@ import {MarketInstance, DevInstance} from '../../types/truffle-contracts' | ||
await dev.approve(market.address, balance, { | ||
from: addressInfo[accountIndex].account | ||
from: addressInfo[accountIndex].account, | ||
}) | ||
@@ -25,0 +25,0 @@ await market.authenticate( |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createPolicy = void 0; | ||
const common_1 = require("./common"); | ||
@@ -14,0 +15,0 @@ function createPolicy(artifacts) { |
import { | ||
AddressConfigInstance, | ||
PolicyFactoryInstance | ||
PolicyFactoryInstance, | ||
} from '../../types/truffle-contracts' | ||
@@ -5,0 +5,0 @@ import {createInstance} from './common' |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createProperty = void 0; | ||
const common_1 = require("./common"); | ||
@@ -41,3 +42,3 @@ function createProperty(artifacts, web3) { | ||
account: userAddresses[i], | ||
property: propertyAddress | ||
property: propertyAddress, | ||
}; | ||
@@ -44,0 +45,0 @@ result.push(addressInfo); |
@@ -40,3 +40,3 @@ import {PropertyFactoryInstance} from '../../types/truffle-contracts' | ||
account: userAddresses[i], | ||
property: propertyAddress | ||
property: propertyAddress, | ||
} | ||
@@ -43,0 +43,0 @@ result.push(addressInfo) |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.changeBalance = void 0; | ||
const common_1 = require("./common"); | ||
@@ -34,3 +35,3 @@ const bignumber_js_1 = __importDefault(require("bignumber.js")); | ||
yield dev.transfer(address, new bignumber_js_1.default(value * decimals), { | ||
from: addressInfo[0].account | ||
from: addressInfo[0].account, | ||
}); | ||
@@ -37,0 +38,0 @@ // eslint-disable-next-line no-await-in-loop |
@@ -24,3 +24,3 @@ import {DevInstance} from '../../types/truffle-contracts' | ||
await dev.transfer(address, new BigNumber(value * decimals), { | ||
from: addressInfo[0].account | ||
from: addressInfo[0].account, | ||
}) | ||
@@ -27,0 +27,0 @@ // eslint-disable-next-line no-await-in-loop |
{ | ||
"name": "@devprtcl/protocol", | ||
"version": "0.2.0", | ||
"version": "2.0.0", | ||
"description": "Securitize for Internet assets", | ||
@@ -8,13 +8,13 @@ "main": "cli/index.js", | ||
"test": "truffle test test/**/*.ts", | ||
"pretest": "npm run build", | ||
"pretest": "yarn build", | ||
"generate": "truffle compile && typechain --target truffle './build/**/*.json'", | ||
"deploy": "truffle migrate --network", | ||
"predeploy": "npm run build", | ||
"lint": "npm run lint:eslint && npm run lint:solium && npm run lint:format", | ||
"predeploy": "yarn build", | ||
"lint": "yarn lint:eslint && yarn lint:solium && yarn lint:format", | ||
"lint:eslint": "eslint . --ext .ts,.js --fix", | ||
"lint:solium": "solium --dir contracts --fix", | ||
"lint:format": "prettier --write '**/*.{sol,js,json,md,yml}'", | ||
"prepack": "npm run build", | ||
"prepack": "yarn build", | ||
"build": "tsc -p tsconfig.build.json", | ||
"prebuild": "rm -f migrations/*.js && rm -f migrations/*/*.js && npm run generate" | ||
"prebuild": "rimraf ['migrations/**/*.js', 'scripts/**/*.js'] && yarn generate" | ||
}, | ||
@@ -32,33 +32,35 @@ "bin": { | ||
"devDependencies": { | ||
"@truffle/hdwallet-provider": "1.0.33", | ||
"@truffle/hdwallet-provider": "1.0.42", | ||
"@types/bent": "7.3.0", | ||
"@types/dotenv": "8.2.0", | ||
"@types/node": "13.9.1", | ||
"@types/ramda": "0.26.44", | ||
"@types/shelljs": "0.8.6", | ||
"@typescript-eslint/eslint-plugin": "2.23.0", | ||
"@typescript-eslint/parser": "2.23.0", | ||
"@types/node": "13.13.14", | ||
"@types/shelljs": "0.8.8", | ||
"@typescript-eslint/eslint-plugin": "3.9.0", | ||
"@typescript-eslint/parser": "3.9.0", | ||
"bent": "7.3.9", | ||
"bignumber.js": "9.0.0", | ||
"dotenv": "8.2.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.10.0", | ||
"eslint-config-xo": "0.29.1", | ||
"eslint-config-xo-typescript": "0.26.0", | ||
"eslint-plugin-prettier": "3.1.2", | ||
"eslint": "7.6.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"eslint-config-xo": "0.32.1", | ||
"eslint-config-xo-typescript": "0.32.0", | ||
"eslint-plugin-prettier": "3.1.4", | ||
"ethlint": "1.2.5", | ||
"husky": "4.2.3", | ||
"prettier": "1.19.1", | ||
"prettier-plugin-solidity": "1.0.0-alpha.45", | ||
"ramda": "0.27.0", | ||
"truffle": "5.1.17", | ||
"husky": "4.2.5", | ||
"p-queue": "6.6.0", | ||
"prettier": "2.0.5", | ||
"prettier-plugin-solidity": "1.0.0-alpha.55", | ||
"rimraf": "3.0.2", | ||
"truffle": "5.1.37", | ||
"truffle-typings": "1.0.8", | ||
"ts-generator": "0.0.8", | ||
"ts-node": "8.6.2", | ||
"typechain": "1.0.5", | ||
"ts-node": "8.10.2", | ||
"typechain": "2.0.0", | ||
"typechain-target-truffle": "1.0.2", | ||
"typescript": "3.8.3", | ||
"web3": "1.2.6" | ||
"typescript": "3.9.7", | ||
"web3": "1.2.11" | ||
}, | ||
"dependencies": { | ||
"@openzeppelin/contracts": "^2.5.0", | ||
"commander": "^5.0.0", | ||
"commander": "^6.0.0", | ||
"shelljs": "^0.8.3" | ||
@@ -88,5 +90,5 @@ }, | ||
"hooks": { | ||
"pre-commit": "npm run lint" | ||
"pre-commit": "yarn lint" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
![Dev Protocol](https://raw.githubusercontent.com/dev-protocol/repository-token/master/public/asset/logo.png) | ||
![Dev Protocol](https://raw.githubusercontent.com/dev-protocol/repository-token/main/public/asset/logo.png) | ||
@@ -11,4 +11,4 @@ [![CI Status](https://github.com/dev-protocol/protocol/workflows/Node/badge.svg)](https://github.com/dev-protocol/protocol/actions) | ||
- Whitepaper: https://github.com/dev-protocol/protocol/blob/master/docs/WHITEPAPER.md | ||
- ホワイトペーパー(日本語): https://github.com/dev-protocol/protocol/blob/master/docs/WHITEPAPER.JA.md | ||
- Whitepaper: https://github.com/dev-protocol/protocol/blob/main/docs/WHITEPAPER.md | ||
- ホワイトペーパー(日本語): https://github.com/dev-protocol/protocol/blob/main/docs/WHITEPAPER.JA.md | ||
@@ -35,3 +35,3 @@ ## How to use | ||
Read the [contributing guide](https://github.com/dev-protocol/protocol/blob/master/.github/CONTRIBUTING.md), and create PR when you have time. 🧚✨ | ||
Read the [contributing guide](https://github.com/dev-protocol/protocol/blob/main/.github/CONTRIBUTING.md), and create PR when you have time. 🧚✨ | ||
@@ -45,4 +45,4 @@ ## How to setup | ||
cd protocol | ||
npm i | ||
npm run generate | ||
yarn | ||
yarn generate | ||
``` | ||
@@ -53,3 +53,3 @@ | ||
``` | ||
npm test | ||
yarn test | ||
``` | ||
@@ -66,3 +66,3 @@ | ||
``` | ||
npm run deploy mock | ||
yarn deploy mock | ||
``` | ||
@@ -83,3 +83,3 @@ | ||
```bash | ||
npm run deploy <network> | ||
yarn deploy <network> | ||
``` | ||
@@ -86,0 +86,0 @@ |
@@ -11,3 +11,3 @@ /* eslint-disable @typescript-eslint/no-var-requires */ | ||
ETHEREUM_MOCK_HOST, | ||
ETHEREUM_MOCK_PORT | ||
ETHEREUM_MOCK_PORT, | ||
} = process.env | ||
@@ -22,6 +22,6 @@ | ||
optimizer: { | ||
enabled: true | ||
} | ||
} | ||
} | ||
enabled: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
@@ -37,3 +37,3 @@ networks: { | ||
gas: 4000000, | ||
gasPrice: 10000000000 | ||
gasPrice: 10000000000, | ||
}, | ||
@@ -48,3 +48,3 @@ ropsten: { | ||
gas: 4000000, | ||
gasPrice: 10000000000 | ||
gasPrice: 10000000000, | ||
}, | ||
@@ -54,3 +54,3 @@ mock: { | ||
port: ETHEREUM_MOCK_PORT, | ||
network_id: '*' | ||
network_id: '*', | ||
}, | ||
@@ -65,5 +65,5 @@ azure: { | ||
gas: 0, | ||
gasPrice: 0 | ||
} | ||
} | ||
gasPrice: 0, | ||
}, | ||
}, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
227321
105
1174
0
29
+ Addedcommander@6.2.1(transitive)
- Removedcommander@5.1.0(transitive)
Updatedcommander@^6.0.0