setup deployment

This commit is contained in:
Max Alekseenko 2020-02-28 15:55:58 +03:00
parent 687825e3de
commit 6550a69249
7 changed files with 127 additions and 8 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
.gitkeep
node_modules
build
.env
.openzeppelin/.session
.openzeppelin/dev-*.json

View File

@ -1,7 +1,11 @@
{
"manifestVersion": "2.2",
"contracts": {},
"dependencies": {},
"contracts": {
"PoaMania": "PoaMania"
},
"dependencies": {
"@openzeppelin/contracts-ethereum-package": "^2.4.0"
},
"name": "poa-mania",
"version": "1.0.0",
"compiler": {

View File

@ -1,7 +1,7 @@
pragma solidity ^0.5.16;
import "@kleros/kleros/contracts/data-structures/SortitionSumTreeFactory.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
library DrawManager {

View File

@ -1,8 +1,8 @@
pragma solidity ^0.5.16;
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "@openzeppelin/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "./Random.sol";
import "./DrawManager.sol";
import "./Sacrifice.sol";

View File

@ -1,3 +1,6 @@
const HDWalletProvider = require('truffle-hdwallet-provider');
require('dotenv').config();
module.exports = {
networks: {
development: {
@ -8,5 +11,10 @@ module.exports = {
gasPrice: 5e9,
networkId: '*',
},
sokol: {
provider: () => new HDWalletProvider(process.env.MNEMONIC, 'https://sokol.poa.network'),
gasPrice: 1e9,
networkId: 77,
},
},
};

105
package-lock.json generated
View File

@ -409,6 +409,11 @@
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-2.5.0.tgz",
"integrity": "sha512-t3jm8FrhL9tkkJTofkznTqo/XXdHi21w5yXwalEnaMOp22ZwZ0f/mmKdlgMMLPFa6bSVHbY88mKESwJT/7m5Lg=="
},
"@openzeppelin/contracts-ethereum-package": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts-ethereum-package/-/contracts-ethereum-package-2.4.0.tgz",
"integrity": "sha512-GC1aOgTnuNnlhdYOCKFizLCQRgYlbImWi+aJ9Lw4Yw4BSLHzfPg+XV0tgn9l+KnFAzgoUEg2aD2wmaHZBjEnSw=="
},
"@openzeppelin/fuzzy-solidity-import-parser": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/@openzeppelin/fuzzy-solidity-import-parser/-/fuzzy-solidity-import-parser-0.1.2.tgz",
@ -1972,6 +1977,11 @@
"is-obj": "^1.0.0"
}
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
},
"drbg.js": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz",
@ -19262,6 +19272,97 @@
}
}
},
"truffle-hdwallet-provider": {
"version": "1.0.17",
"resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-1.0.17.tgz",
"integrity": "sha512-s6DvSP83jiIAc6TUcpr7Uqnja1+sLGJ8og3X7n41vfyC4OCaKmBtXL5HOHf+SsU3iblOvnbFDgmN6Y1VBL/fsg==",
"requires": {
"any-promise": "^1.3.0",
"bindings": "^1.3.1",
"web3": "1.2.1",
"websocket": "^1.0.28"
},
"dependencies": {
"eth-lib": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz",
"integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=",
"requires": {
"bn.js": "^4.11.6",
"elliptic": "^6.4.0",
"xhr-request-promise": "^0.1.2"
}
},
"underscore": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
"integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
},
"web3": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/web3/-/web3-1.2.1.tgz",
"integrity": "sha512-nNMzeCK0agb5i/oTWNdQ1aGtwYfXzHottFP2Dz0oGIzavPMGSKyVlr8ibVb1yK5sJBjrWVnTdGaOC2zKDFuFRw==",
"requires": {
"web3-bzz": "1.2.1",
"web3-core": "1.2.1",
"web3-eth": "1.2.1",
"web3-eth-personal": "1.2.1",
"web3-net": "1.2.1",
"web3-shh": "1.2.1",
"web3-utils": "1.2.1"
}
},
"web3-eth": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.1.tgz",
"integrity": "sha512-/2xly4Yry5FW1i+uygPjhfvgUP/MS/Dk+PDqmzp5M88tS86A+j8BzKc23GrlA8sgGs0645cpZK/999LpEF5UdA==",
"requires": {
"underscore": "1.9.1",
"web3-core": "1.2.1",
"web3-core-helpers": "1.2.1",
"web3-core-method": "1.2.1",
"web3-core-subscriptions": "1.2.1",
"web3-eth-abi": "1.2.1",
"web3-eth-accounts": "1.2.1",
"web3-eth-contract": "1.2.1",
"web3-eth-ens": "1.2.1",
"web3-eth-iban": "1.2.1",
"web3-eth-personal": "1.2.1",
"web3-net": "1.2.1",
"web3-utils": "1.2.1"
}
},
"web3-eth-contract": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.1.tgz",
"integrity": "sha512-kYFESbQ3boC9bl2rYVghj7O8UKMiuKaiMkxvRH5cEDHil8V7MGEGZNH0slSdoyeftZVlaWSMqkRP/chfnKND0g==",
"requires": {
"underscore": "1.9.1",
"web3-core": "1.2.1",
"web3-core-helpers": "1.2.1",
"web3-core-method": "1.2.1",
"web3-core-promievent": "1.2.1",
"web3-core-subscriptions": "1.2.1",
"web3-eth-abi": "1.2.1",
"web3-utils": "1.2.1"
}
},
"web3-utils": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.1.tgz",
"integrity": "sha512-Mrcn3l58L+yCKz3zBryM6JZpNruWuT0OCbag8w+reeNROSGVlXzUQkU+gtAwc9JCZ7tKUyg67+2YUGqUjVcyBA==",
"requires": {
"bn.js": "4.11.8",
"eth-lib": "0.2.7",
"ethjs-unit": "0.1.6",
"number-to-bn": "1.7.0",
"randomhex": "0.1.5",
"underscore": "1.9.1",
"utf8": "3.0.0"
}
}
}
},
"truffle-interface-adapter": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/truffle-interface-adapter/-/truffle-interface-adapter-0.2.5.tgz",
@ -21292,8 +21393,8 @@
}
},
"websocket": {
"version": "github:web3-js/WebSocket-Node#905deb4812572b344f5801f8c9ce8bb02799d82e",
"from": "github:web3-js/WebSocket-Node#polyfill/globalThis",
"version": "1.0.29",
"resolved": "github:web3-js/WebSocket-Node#905deb4812572b344f5801f8c9ce8bb02799d82e",
"requires": {
"debug": "^2.2.0",
"es5-ext": "^0.10.50",

View File

@ -19,6 +19,9 @@
"dependencies": {
"@kleros/kleros": "DeltaCamp/kleros#ca7fbdcc195cfd1267efb99aae905c3400a5ea5f",
"@openzeppelin/cli": "^2.7.1",
"@openzeppelin/contracts": "^2.5.0"
"@openzeppelin/contracts": "^2.5.0",
"@openzeppelin/contracts-ethereum-package": "^2.4.0",
"dotenv": "^8.2.0",
"truffle-hdwallet-provider": "^1.0.17"
}
}