Skip to content

Commit

Permalink
Merge pull request #4 from indexed-finance/v1.0.14
Browse files Browse the repository at this point in the history
V1.0.15
  • Loading branch information
d1ll0n committed Dec 2, 2020
2 parents 252c5d5 + d36f15f commit e421b0c
Show file tree
Hide file tree
Showing 13 changed files with 307 additions and 201 deletions.
4 changes: 3 additions & 1 deletion .gitignore
@@ -1,4 +1,6 @@
node_modules
.env
artifacts/
cache/
cache/
coverage/
coverage.json
6 changes: 3 additions & 3 deletions contracts/CodeHashes.sol
Expand Up @@ -8,7 +8,7 @@ pragma solidity ^0.6.0;
* values when they import the salt library.
*/
library CodeHashes {
bytes32 internal constant ONE_TO_ONE_CODEHASH = 0xdf533b6e999d326280ce88ca39ea2eddf95ed96f6c153ed5642d9b0a95dba4a2;
bytes32 internal constant MANY_TO_ONE_CODEHASH = 0x8fb4522edc5e0645a7ae5cfdbfe3b34d4a14de9e0279b74da795856b5ef4f1e6;
bytes32 internal constant IMPLEMENTATION_HOLDER_CODEHASH = 0xfc7aed17e5c5d36a15e443235cb9c59bae4a013202cde6ab3e657fa1176d7f3e;
bytes32 internal constant ONE_TO_ONE_CODEHASH = 0x63d9f7b5931b69188c8f6b806606f25892f1bb17b7f7e966fe3a32c04493aee4;
bytes32 internal constant MANY_TO_ONE_CODEHASH = 0xa035ad05a1663db5bfd455b99cd7c6ac6bd49269738458eda140e0b78ed53f79;
bytes32 internal constant IMPLEMENTATION_HOLDER_CODEHASH = 0x11c370493a726a0ffa93d42b399ad046f1b5a543b6e72f1a64f1488dc1c58f2c;
}
7 changes: 6 additions & 1 deletion deploy/1_deploy.js
Expand Up @@ -14,10 +14,14 @@ const logger = {

module.exports = async ({
deployments,
getNamedAccounts
getNamedAccounts,
getChainId
}) => {
const { save } = deployments;
const { deployer } = await getNamedAccounts();
const chainId = await getChainId();

const gasPrice = ((+chainId) == 1) ? 25000000000 : 1000000000;

const deploy = async (name, contractName, opts) => {
logger.info(`Deploying ${contractName} [${name}]`);
Expand All @@ -34,6 +38,7 @@ module.exports = async ({
await deploy('DelegateCallProxyManager', 'proxyManager', {
from: deployer,
gas: 4000000,
gasPrice,
args: []
});
};
Expand Down
1 change: 0 additions & 1 deletion deployments/buidlerevm/.chainId

This file was deleted.

40 changes: 20 additions & 20 deletions deployments/mainnet/DelegateCallProxyManager.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions deployments/mainnet/proxyManager.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions deployments/rinkeby/DelegateCallProxyManager.json

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions deployments/rinkeby/proxyManager.json

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

97 changes: 93 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 30 additions & 10 deletions package.json
@@ -1,26 +1,44 @@
{
"name": "@indexed-finance/proxies",
"version": "1.0.13",
"version": "1.0.15",
"description": "Solidity delegatecall proxy contracts.",
"repository": {
"url": "https://github.com/indexed-finance/proxies"
},
"files": [
"contracts",
"artifacts",
"contracts/CodeHashes.sol",
"contracts/DelegateCallProxyManager.sol",
"contracts/DelegateCallProxyManyToOne.sol",
"contracts/DelegateCallProxyOneToOne.sol",
"contracts/interfaces/IDelegateCallProxyManager.sol",
"contracts/ManyToOneImplementationHolder.sol",
"contracts/SaltyLib.sol",
"artifacts/CodeHashes.json",
"artifacts/DelegateCallProxyManager.json",
"artifacts/DelegateCallProxyManyToOne.json",
"artifacts/DelegateCallProxyOneToOne.json",
"artifacts/IDelegateCallProxyManager.json",
"artifacts/ManyToOneImplementationHolder.json",
"artifacts/SaltyLib.json",
"deployments/rinkeby",
"deployments/mainnet"
],
"scripts": {
"prebuild": "buidler compile && node ./scripts/write-code-hashes.js",
"clean-build": "rimraf ./artifacts && rimraf ./cache && npm run finish-build",
"prepare-build": "npm run clean-build && buidler-verify-helper --prepare --contracts DelegateCallProxyManager",
"finish-build": "buidler-verify-helper --clean",
"prepare-test": "npm run clean-build && npx buidler compile && cross-env IS_COVERAGE=true node ./scripts/write-code-hashes.js",
"prebuild": "npm run prepare-build && buidler compile && node ./scripts/write-code-hashes.js",
"build": "buidler compile",
"postbuild": "echo Built sol files with updated CodeHashes",
"precoverage": "cross-env IS_COVERAGE=true node ./scripts/write-code-hashes.js",
"postbuild": "npm run finish-build && echo Built sol files with updated CodeHashes",
"precoverage": "npm run prepare-test",
"coverage": "buidler coverage --network coverage --solcoverjs ./.solcover.js",
"postcoverage": "node ./scripts/write-code-hashes.js",
"deploy:rinkeby": "buidler --network rinkeby deploy",
"deploy:mainnet": "buidler --network mainnet deploy",
"test": "buidler test"
"postcoverage": "npm run build",
"deploy:rinkeby": "npm run prepare-build && buidler --network rinkeby deploy",
"deploy:mainnet": "npm run prepare-build && buidler --network mainnet deploy",
"pretest": "npm run prepare-test",
"test": "buidler test",
"posttest": "npm run build"
},
"husky": {
"hooks": {
Expand All @@ -41,6 +59,7 @@
"@nomiclabs/buidler-etherscan": "^2.1.0",
"buidler-deploy": "^0.6.0-beta.16",
"buidler-ethers-v5": "^0.2.2",
"buidler-verify-helper": "^1.0.2",
"chai": "^4.2.0",
"chalk": "^4.1.0",
"coveralls": "^3.1.0",
Expand All @@ -52,6 +71,7 @@
"moment": "^2.29.1",
"prettier": "^2.0.5",
"prettier-plugin-solidity": "^1.0.0-alpha.55",
"rimraf": "^3.0.2",
"solidity-coverage": "^0.7.10",
"solium": "^1.2.5",
"solium-plugin-security": "^0.1.1",
Expand Down

0 comments on commit e421b0c

Please sign in to comment.