-
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.
Merge pull request #1 from 0xJomo/onramp
sepolia deployment
- Loading branch information
Showing
35 changed files
with
5,497 additions
and
1,437 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
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,45 @@ | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
import { ethers } from 'hardhat'; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployer, simpleOffchainVerifier } = await hre.getNamedAccounts(); | ||
const asset = await (await hre.ethers.getContract('SimpleERC20', deployer)).getAddress(); | ||
console.log('vault asset: ', asset); | ||
const { deploy } = hre.deployments; | ||
//const useProxy = !hre.network.live; | ||
const useProxy = true; | ||
const max = ethers.parseEther('1'); | ||
const min = ethers.parseEther('.001'); | ||
const fee = 0; | ||
|
||
// proxy only in non-live network (localhost and hardhat network) enabling HCR (Hot Contract Replacement) | ||
// in live network, proxy is disabled and constructor is invoked | ||
await deploy('DeRampVault', { | ||
from: deployer, | ||
proxy: useProxy && { | ||
owner: simpleOffchainVerifier, | ||
proxyContract: 'UUPS', | ||
|
||
execute: { | ||
init: { | ||
methodName: 'initialize', | ||
args: [asset, 'DeRamp Token', 'RAMP', max, min, fee, simpleOffchainVerifier], | ||
}, | ||
|
||
onUpgrade: { | ||
methodName: 'postUpgrade', | ||
args: [asset, 'DeRamp Token', 'RAMP', max, min, fee, simpleOffchainVerifier], | ||
}, | ||
}, | ||
}, | ||
|
||
log: true, | ||
autoMine: true, // speed up deployment on local network (ganache, hardhat), no effect on live networks | ||
}); | ||
|
||
return !useProxy; // when live network, record the script as executed to prevent rexecution | ||
}; | ||
export default func; | ||
func.id = 'deploy_deramp_vault'; // id required to prevent reexecution | ||
func.tags = ['DeRampVault']; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
11155111 |
Oops, something went wrong.