-
Notifications
You must be signed in to change notification settings - Fork 49
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 #493 from bancorprotocol/add-fee-exemption-whitelist
Add fee exemption whitelist
- Loading branch information
Showing
8 changed files
with
305 additions
and
119 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
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,42 @@ | ||
import { DeployedContracts, execute, InstanceName, setDeploymentMetadata, upgradeProxy } from '../../utils/Deploy'; | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
|
||
const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironment) => { | ||
const { deployer, bancorArbitrageAddress, carbonPOLAddress } = await getNamedAccounts(); | ||
|
||
// get the deployed contracts | ||
const externalProtectionVault = await DeployedContracts.ExternalProtectionVault.deployed(); | ||
const masterVault = await DeployedContracts.MasterVault.deployed(); | ||
const networkSettings = await DeployedContracts.NetworkSettings.deployed(); | ||
const bntGovernance = await DeployedContracts.BNTGovernance.deployed(); | ||
const vbntGovernance = await DeployedContracts.VBNTGovernance.deployed(); | ||
const bnBNT = await DeployedContracts.bnBNT.deployed(); | ||
|
||
// upgrade the BancorNetwork contract | ||
await upgradeProxy({ | ||
name: InstanceName.BancorNetwork, | ||
args: [ | ||
bntGovernance.address, | ||
vbntGovernance.address, | ||
networkSettings.address, | ||
masterVault.address, | ||
externalProtectionVault.address, | ||
bnBNT.address, | ||
carbonPOLAddress | ||
], | ||
from: deployer | ||
}); | ||
|
||
// add bancor arbitrage contract address to fee exemption whitelist | ||
await execute({ | ||
name: InstanceName.BancorNetwork, | ||
methodName: 'addToWhitelist', | ||
args: [bancorArbitrageAddress], | ||
from: deployer | ||
}); | ||
|
||
return true; | ||
}; | ||
|
||
export default setDeploymentMetadata(__filename, func); |
Oops, something went wrong.