forked from safe-global/safe-core-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure hardhat and deployment of Safe contracts for testing
- Loading branch information
1 parent
3c9deb5
commit 0066940
Showing
5 changed files
with
11,235 additions
and
1,445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pragma solidity >=0.5.0 <0.7.0; | ||
|
||
import { GnosisSafeProxyFactory } from "@gnosis.pm/safe-contracts/contracts/proxies/GnosisSafeProxyFactory.sol"; | ||
import { GnosisSafe } from "@gnosis.pm/safe-contracts/contracts/GnosisSafe.sol"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import '@nomiclabs/hardhat-ethers' | ||
import '@nomiclabs/hardhat-waffle' | ||
import 'hardhat-deploy' | ||
import 'hardhat-typechain' | ||
import { HardhatUserConfig } from 'hardhat/types' | ||
|
||
const config: HardhatUserConfig = { | ||
defaultNetwork: "hardhat", | ||
solidity: { | ||
compilers: [ | ||
{ version: '0.5.17' } | ||
] | ||
}, | ||
paths: { | ||
artifacts: 'artifacts', | ||
deploy: 'hardhat/deploy', | ||
sources: 'contracts', | ||
tests: 'tests' | ||
}, | ||
networks: { | ||
hardhat: { | ||
allowUnlimitedContractSize: true, | ||
blockGasLimit: 100000000, | ||
gas: 100000000 | ||
} | ||
}, | ||
namedAccounts: { | ||
deployer: 0, | ||
} | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { DeployFunction } from 'hardhat-deploy/types' | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types' | ||
|
||
const deploy: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { | ||
const { deployments, getNamedAccounts } = hre | ||
const { deployer } = await getNamedAccounts() | ||
const { deploy } = deployments | ||
|
||
await deploy('GnosisSafe', { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: true | ||
}) | ||
|
||
await deploy('GnosisSafeProxyFactory', { | ||
from: deployer, | ||
args: [], | ||
log: true, | ||
deterministicDeployment: true | ||
}) | ||
} | ||
|
||
export default deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.