-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployment preparation:
AvalancheRootGaugeFactory
V2 (#76)
- Loading branch information
Showing
16 changed files
with
638 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
pragma solidity ^0.7.0; | ||
pragma experimental ABIEncoderV2; | ||
|
||
/** | ||
* @dev Partial interface for LayerZero BAL proxy. | ||
*/ | ||
interface ILayerZeroBALProxy { | ||
/// @dev Emitted when `_amount` tokens are moved from the sender `_from` to (`_dstChainId`, `_toAddress`) | ||
event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint256 _amount); | ||
|
||
function owner() external view returns (address); | ||
|
||
function setUseCustomAdapterParams(bool) external; | ||
} |
146 changes: 146 additions & 0 deletions
146
tasks/20230811-avalanche-root-gauge-factory-v2/artifact/AvalancheRootGaugeFactory.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
tasks/20230811-avalanche-root-gauge-factory-v2/build-info/AvalancheRootGaugeFactory.json
Large diffs are not rendered by default.
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,14 @@ | ||
import { Task, TaskRunOptions } from '@src'; | ||
import { AvalancheRootGaugeFactoryDeployment } from './input'; | ||
|
||
export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => { | ||
const input = task.input() as AvalancheRootGaugeFactoryDeployment; | ||
|
||
const args = [input.Vault, input.BalancerMinter, input.BALProxy]; | ||
|
||
const factory = await task.deployAndVerify('AvalancheRootGaugeFactory', args, from, force); | ||
|
||
const implementation = await factory.getGaugeImplementation(); | ||
await task.verify('AvalancheRootGauge', implementation, [input.BalancerMinter, input.BALProxy]); | ||
task.save({ AvalancheRootGauge: implementation }); | ||
}; |
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,21 @@ | ||
import { Task, TaskMode } from '@src'; | ||
|
||
export type AvalancheRootGaugeFactoryDeployment = { | ||
Vault: string; | ||
BalancerMinter: string; | ||
BALProxy: string; | ||
}; | ||
|
||
const Vault = new Task('20210418-vault', TaskMode.READ_ONLY); | ||
const BalancerMinter = new Task('20220325-gauge-controller', TaskMode.READ_ONLY); | ||
// Ethereum BAL proxy https://etherscan.io/address/0xE15bCB9E0EA69e6aB9FA080c4c4A5632896298C3 | ||
// is wired to BAL token in AVAX: https://snowtrace.io/address/0xE15bCB9E0EA69e6aB9FA080c4c4A5632896298C3 | ||
const BALProxy = '0xE15bCB9E0EA69e6aB9FA080c4c4A5632896298C3'; | ||
|
||
export default { | ||
mainnet: { | ||
Vault, | ||
BalancerMinter, | ||
BALProxy, | ||
}, | ||
}; |
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,9 @@ | ||
# 2023-08-11 - Avalanche Root Gauge Factory V2 | ||
|
||
Deployment of the `AvalancheRootGaugeFactory`, for stakeless gauges that bridge funds to their Avalanche counterparts. | ||
This version uses a Layer Zero Omni Fungible Token as the BAL bridge, which is currently used in the Avalanche network. | ||
Replaces [Avalanche root gauge V1](../deprecated/20230529-avalanche-root-gauge-factory/) which used anySwap wrappers to bridge BAL. | ||
|
||
## Useful Files | ||
|
||
- [`AvalancheRootGaugeFactory` artifact](./artifact/AvalancheRootGaugeFactory.json) |
Oops, something went wrong.