Skip to content

Commit

Permalink
feat/rootstock
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamicham committed Jun 4, 2024
1 parent 248873b commit 949f69d
Show file tree
Hide file tree
Showing 15 changed files with 4,571 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@
# ETH_NODE_URI_ASTARZKEVM=
# ETHERSCAN_API_KEY_ASTARZKEVM=""
# MODE_ETHERSCAN_API_ASTARZKEVM=""

#ETH_NODE_URI_ROOTSTOCK=
#ROOTSTOCK_ETHERSCAN_API_KEY="
26 changes: 13 additions & 13 deletions deploy/0_distributor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
let core: string;
// TODO: change the coreMerkl address to that of the desired chain

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

Expand All @@ -39,11 +39,11 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
console.log('Now deploying Distributor');
console.log('Starting with the implementation');

await deploy('Distributor_Implementation_V2_1', {
contract: 'Distributor',
from: deployer.address,
log: !argv.ci,
});
// await deploy('Distributor_Implementation_V2_1', {
// contract: 'Distributor',
// from: deployer.address,
// log: !argv.ci,
// });

const implementationAddress = (await ethers.getContract('Distributor_Implementation_V2_1')).address;

Expand All @@ -52,18 +52,18 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {

console.log('Now deploying the Proxy');

await deploy('Distributor', {
contract: 'ERC1967Proxy',
from: deployer.address,
args: [implementationAddress, '0x'],
log: !argv.ci,
});
// await deploy('Distributor', {
// contract: 'ERC1967Proxy',
// from: deployer.address,
// args: [implementationAddress, '0x'],
// log: !argv.ci,
// });

const distributor = (await deployments.get('Distributor')).address;
console.log(`Successfully deployed contract at the address ${distributor}`);
console.log('Initializing the contract');
const contract = new ethers.Contract(distributor, Distributor__factory.createInterface(), deployer) as Distributor;
await (await contract.connect(deployer).initialize(core)).wait();
// await (await contract.connect(deployer).initialize(core)).wait();
console.log('Contract successfully initialized');
console.log('');
};
Expand Down
2 changes: 1 addition & 1 deletion deploy/1_distributionCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
const { deployer } = await ethers.getNamedSigners();

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

Expand Down
1 change: 1 addition & 0 deletions deployments/rootstock/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
30
132 changes: 132 additions & 0 deletions deployments/rootstock/DistributionCreator.json

Large diffs are not rendered by default.

Loading

0 comments on commit 949f69d

Please sign in to comment.