Skip to content

Commit

Permalink
chore: fuse and xlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Picodes committed May 21, 2024
1 parent 2609b16 commit 4f57774
Show file tree
Hide file tree
Showing 25 changed files with 9,198 additions and 29 deletions.
9 changes: 6 additions & 3 deletions deploy/0_distributor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChainId, CONTRACTS_ADDRESSES, registry } from '@angleprotocol/sdk';
import { ChainId, CONTRACTS_ADDRESSES, CoreBorrow, CoreBorrow__factory, registry } from '@angleprotocol/sdk';
import { DeployFunction } from 'hardhat-deploy/types';
import yargs from 'yargs';
import * as readline from 'readline';
Expand All @@ -17,9 +17,12 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {

let core: string;
// TODO: change the coreMerkl address to that of the desired chain
// Merkl deployer: 0x9f76a95AA7535bb0893cf88A146396e00ed21A12

core = '0xE9169817EdBFe5FCF629eD8b3C2a34E2a50ec84C';
core = '0x1899D4cC1BFf96038f9E8f5ecc898c70E2ff72ee';
const coreContract = new ethers.Contract(core, CoreBorrow__factory.createInterface(), deployer) as any;
if (await coreContract.GOVERNOR_ROLE()!= '0x7935bd0ae54bc31f548c14dba4d37c5c64b3f8ca900cb468fb8abd54d5894f55') throw 'Invalid Core Merkl'

if (deployer.address !== '0x9f76a95AA7535bb0893cf88A146396e00ed21A12') throw `Invalid deployer address: ${deployer.address}`;
/*
if (!network.live) {
// If we're in mainnet fork, we're using the `CoreBorrow` address from mainnet
Expand Down
9 changes: 7 additions & 2 deletions deploy/1_distributionCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ import * as readline from 'readline';

import { DistributionCreator, DistributionCreator__factory } from '../typechain';
import { parseAmount } from '../utils/bignumber';
import { CoreBorrow__factory } from '@angleprotocol/sdk';
const argv = yargs.env('').boolean('ci').parseSync();

const func: DeployFunction = async ({ deployments, ethers, network }) => {
const { deploy } = deployments;
const { deployer } = await ethers.getNamedSigners();

let core: string;
// TODO: change the coreMerkl address to that of the desired chain
core = '0xE9169817EdBFe5FCF629eD8b3C2a34E2a50ec84C';
core = '0x1899D4cC1BFf96038f9E8f5ecc898c70E2ff72ee';
const coreContract = new ethers.Contract(core, CoreBorrow__factory.createInterface(), deployer) as any;
if (await coreContract.GOVERNOR_ROLE()!= '0x7935bd0ae54bc31f548c14dba4d37c5c64b3f8ca900cb468fb8abd54d5894f55') throw 'Invalid Core Merkl'

if (deployer.address !== '0x9f76a95AA7535bb0893cf88A146396e00ed21A12') throw `Invalid deployer address: ${deployer.address}`;

/*
if (!network.live) {
// If we're in mainnet fork, we're using the `CoreBorrow` address from mainnet
Expand Down
6 changes: 6 additions & 0 deletions deploy/aglaMerkl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DeployFunction } from 'hardhat-deploy/types';
import yargs from 'yargs';
import { ERC20, ERC20__factory, MockToken, MockToken__factory } from '../typechain';

const argv = yargs.env('').boolean('ci').parseSync();

Expand All @@ -22,6 +23,11 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {

const implementationAddress = (await ethers.getContract(implementationName)).address;

const tokenContract = new ethers.Contract(implementationAddress, MockToken__factory.createInterface(), deployer) as MockToken;

await tokenContract.mint(deployer.address, "1000000000000000000000000000");


console.log(`Successfully deployed the contract ${implementationName} at ${implementationAddress}`);
console.log('');
};
Expand Down
1 change: 1 addition & 0 deletions deployments/fuse/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
122
132 changes: 132 additions & 0 deletions deployments/fuse/DistributionCreator.json

Large diffs are not rendered by default.

Loading

0 comments on commit 4f57774

Please sign in to comment.