-
Notifications
You must be signed in to change notification settings - Fork 1
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
88a57fa
commit 8348588
Showing
14 changed files
with
274 additions
and
175 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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
ALICE_PRIVATE_KEY = #The private key of the account you intend to use | ||
BOB_PRIVATE_KEY = | ||
CARL_PRIVATE_KEY = | ||
INFURA_API_KEY = #Your Infura API key | ||
# Testnet Networks | ||
ALICE_PRIVATE_KEY = | ||
BOB_PRIVATE_KEY = | ||
CARL_PRIVATE_KEY = | ||
|
||
# Mainnet AURORA | ||
ADMIN_PRIVATE_KEY = | ||
OPERATOR_PRIVATE_KEY = | ||
LP_FEE_COLLECTOR_PRIVATE_KEY = | ||
DEPOSITOR_FEE_COLLECTOR_PRIVATE_KEY = | ||
|
||
# Nodes | ||
INFURA_API_KEY = | ||
ALCHEMY_API_KEY = |
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 |
---|---|---|
@@ -1,40 +1,62 @@ | ||
////////////////////// | ||
// ROBOT 🤖 Config // | ||
////////////////////// | ||
|
||
// Goerli test addresses | ||
const STAKED_AURORA_VAULT_ADDRESS = "0xD6a1BEB40523A91B8424C02517219875A5D95c01"; | ||
const LIQUIDITY_POOL_ADDRESS = "0x9156273eE2684BE1C9F1064cCE43f30E766c8496"; | ||
const STAKING_MANAGER_ADDRESS = "0xf8Cb922aBdb0a2d4478ADE41a493d9A11e0e6009"; | ||
///////////////////////////// | ||
// Global stAUR 🪐 Config // | ||
///////////////////////////// | ||
|
||
const DECIMALS = ethers.BigNumber.from(10).pow(18); | ||
|
||
// AURORA Mainnet addresses | ||
const AURORA_PLUS_ADDRESS = "0xccc2b1aD21666A5847A804a73a41F904C4a4A0Ec"; | ||
const AURORA_TOKEN_ADDRESS = "0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79"; | ||
const DEPOSITOR_00_ADDRESS = "0xf56Baf1EE71fD4d6938c88E1C4bd0422ee768932"; | ||
const DEPOSITOR_01_ADDRESS = "0x7ca831De9E59D7414313a1F7a003cc7d011caFE2"; | ||
const LIQUIDITY_POOL_ADDRESS = "0x2b22F6ae30DD752B5765dB5f2fE8eF5c5d2F154B"; | ||
const STAKED_AURORA_VAULT_ADDRESS = "0xb01d35D469703c6dc5B369A1fDfD7D6009cA397F"; | ||
const STAKING_MANAGER_ADDRESS = "0x69e3a362ffD379cB56755B142c2290AFbE5A6Cc8"; | ||
|
||
const DEPOSITORS_ADDRESS = [ DEPOSITOR_00_ADDRESS, DEPOSITOR_01_ADDRESS ]; | ||
|
||
// Accounts | ||
async function generateAccounts() { | ||
const [ owner, operator ] = await ethers.getSigners(); | ||
const [ | ||
admin, | ||
operator, | ||
lpFeeCollector, | ||
depositorFeeCollector | ||
] = await ethers.getSigners(); | ||
|
||
// Current Contracts Accounts | ||
const VAULT_ADMIN_ACCOUNT = owner; | ||
const MANAGER_ADMIN_ACCOUNT = owner; | ||
const VAULT_ADMIN_ACCOUNT = admin; | ||
const MANAGER_ADMIN_ACCOUNT = admin; | ||
const LIQ_POOL_ADMIN_ACCOUNT = admin; | ||
const DEPOSITOR_ADMIN_ACCOUNT = admin; | ||
|
||
const VAULT_OPERATOR_ACCOUNT = operator; | ||
const MANAGER_OPERATOR_ACCOUNT = operator; | ||
|
||
const DEPOSITOR_ADMIN_ACCOUNT = operator; | ||
const LP_FEE_COLLECTOR_ACCOUNT = lpFeeCollector; | ||
const DEPOSITOR_FEE_COLLECTOR_ACCOUNT = depositorFeeCollector; | ||
|
||
return { | ||
VAULT_ADMIN_ACCOUNT, | ||
DEPOSITOR_ADMIN_ACCOUNT, | ||
DEPOSITOR_FEE_COLLECTOR_ACCOUNT, | ||
LIQ_POOL_ADMIN_ACCOUNT, | ||
LP_FEE_COLLECTOR_ACCOUNT, | ||
MANAGER_ADMIN_ACCOUNT, | ||
VAULT_OPERATOR_ACCOUNT, | ||
MANAGER_OPERATOR_ACCOUNT, | ||
DEPOSITOR_ADMIN_ACCOUNT | ||
VAULT_ADMIN_ACCOUNT, | ||
VAULT_OPERATOR_ACCOUNT | ||
}; | ||
} | ||
|
||
module.exports = { | ||
generateAccounts, | ||
STAKED_AURORA_VAULT_ADDRESS, | ||
AURORA_PLUS_ADDRESS, | ||
AURORA_TOKEN_ADDRESS, | ||
DECIMALS, | ||
DEPOSITORS_ADDRESS, | ||
DEPOSITOR_00_ADDRESS, | ||
DEPOSITOR_01_ADDRESS, | ||
LIQUIDITY_POOL_ADDRESS, | ||
STAKING_MANAGER_ADDRESS, | ||
DECIMALS | ||
STAKED_AURORA_VAULT_ADDRESS, | ||
STAKING_MANAGER_ADDRESS | ||
}; |
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,15 @@ | ||
const ACCOUNTS = { | ||
"single": "0x9DF9F65bfcF4Bc6E0C891Eed41a9766f0bf5C319", | ||
"bulk": [ | ||
"0x9DF9F65bfcF4Bc6E0C891Eed41a9766f0bf5C319", | ||
"0x0B438De1DCa9FBa6D14F17c1F0969ECc73C8186F", | ||
"0xf5597b4094058efe44fe61C8f2844823Fc566e3c", | ||
"0x5b8Dc6c888cB5b553f12e6Dd27E5848874f545DE", | ||
"0x88F5354b08B674E93439a2be83dc1fFa8D849564", | ||
"0x56D994c08CdC5c9189B4d6863129e5F195C6E8F2", | ||
"0x7D4962861A7EA9208B5059Bf7Cc169B5c918e74B", | ||
"0x8DF3a720c7BDBCf47EFAd8F6158d9DB036b81349" | ||
] | ||
} | ||
|
||
module.exports = { ACCOUNTS }; |
This file was deleted.
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,45 @@ | ||
const hre = require("hardhat"); | ||
const { getCurrentTimestamp } = require("../_utils"); | ||
const { | ||
AURORA_TOKEN_ADDRESS, | ||
DECIMALS, | ||
LIQUIDITY_POOL_ADDRESS, | ||
generateAccounts | ||
} = require("../_config"); | ||
|
||
// ⚠️ UPDATE the amount to deposit. | ||
const liquidityDeposit = ethers.BigNumber.from(4_900).mul(DECIMALS); | ||
|
||
console.log("Mr Robot 🤖"); | ||
console.log("Started at: %s", getCurrentTimestamp()); | ||
console.log("Network: %s", hre.network.name); | ||
console.log("-------------------------") | ||
|
||
async function main() { | ||
const { LIQ_POOL_ADMIN_ACCOUNT } = await generateAccounts(); | ||
const LiquidityPool = await ethers.getContractFactory("LiquidityPool"); | ||
const Token = await ethers.getContractFactory("Token"); | ||
const LiquidityPoolContract = await LiquidityPool.attach(LIQUIDITY_POOL_ADDRESS); | ||
const AuroraTokenContract = await Token.attach(AURORA_TOKEN_ADDRESS); | ||
|
||
const request01 = await AuroraTokenContract | ||
.connect(LIQ_POOL_ADMIN_ACCOUNT) | ||
.approve(LiquidityPoolContract.address, liquidityDeposit); | ||
console.log("Approve request: %s", request01); | ||
await request01.wait(); | ||
|
||
const request02 = await LiquidityPoolContract | ||
.connect(LIQ_POOL_ADMIN_ACCOUNT) | ||
.deposit(liquidityDeposit, LIQ_POOL_ADMIN_ACCOUNT.address); | ||
console.log("Deposit request: %s", request02); | ||
await request02.wait(); | ||
|
||
console.log("%s AURORA tokens deposited 🎱.", liquidityDeposit); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
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,46 @@ | ||
const hre = require("hardhat"); | ||
const { getCurrentTimestamp } = require("../_utils"); | ||
const { | ||
AURORA_TOKEN_ADDRESS, | ||
DECIMALS, | ||
STAKED_AURORA_VAULT_ADDRESS, | ||
generateAccounts | ||
} = require("../_config"); | ||
|
||
// ⚠️ UPDATE the amount to deposit. | ||
// const vaultDeposit = ethers.BigNumber.from(300).mul(DECIMALS); | ||
const vaultDeposit = ethers.BigNumber.from("718062481880544989308"); | ||
|
||
console.log("Mr Robot 🤖"); | ||
console.log("Started at: %s", getCurrentTimestamp()); | ||
console.log("Network: %s", hre.network.name); | ||
console.log("-------------------------") | ||
|
||
async function main() { | ||
const { VAULT_ADMIN_ACCOUNT } = await generateAccounts(); | ||
const StakedAuroraVault = await ethers.getContractFactory("StakedAuroraVault"); | ||
const Token = await ethers.getContractFactory("Token"); | ||
const StakedAuroraVaultContract = await StakedAuroraVault.attach(STAKED_AURORA_VAULT_ADDRESS); | ||
const AuroraTokenContract = await Token.attach(AURORA_TOKEN_ADDRESS); | ||
|
||
const request01 = await AuroraTokenContract | ||
.connect(VAULT_ADMIN_ACCOUNT) | ||
.approve(StakedAuroraVaultContract.address, vaultDeposit); | ||
console.log("Approve request: %s", request01); | ||
await request01.wait(); | ||
|
||
const request02 = await StakedAuroraVaultContract | ||
.connect(VAULT_ADMIN_ACCOUNT) | ||
.deposit(vaultDeposit, VAULT_ADMIN_ACCOUNT.address); | ||
console.log("Deposit request: %s", request02); | ||
await request02.wait(); | ||
|
||
console.log("%s AURORA tokens deposited 🔐.", vaultDeposit); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
Oops, something went wrong.