-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d119ac2
commit 6e61525
Showing
1 changed file
with
25 additions
and
0 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,25 @@ | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { DeployedContracts, upgradeProxy, InstanceName, setDeploymentMetadata } from '../../../utils/Deploy'; | ||
import { NATIVE_TOKEN_ADDRESS } from '../../../utils/Constants'; | ||
|
||
/** | ||
* upgrade carbon vortex 2.0 to v2: | ||
* add maxInput to trade function | ||
* fix upgradeable contract | ||
*/ | ||
const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironment) => { | ||
const { deployer, bnt, vault, oldVortex } = await getNamedAccounts(); | ||
const carbonController = await DeployedContracts.CarbonController.deployed(); | ||
|
||
await upgradeProxy({ | ||
name: InstanceName.CarbonVortex, | ||
from: deployer, | ||
args: [carbonController.address, vault, oldVortex, bnt, NATIVE_TOKEN_ADDRESS, bnt], | ||
checkVersion: false | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
export default setDeploymentMetadata(__filename, func); |