Skip to content

Commit

Permalink
using proxy for sepolia, change onramp script to use ethers.getSigner
Browse files Browse the repository at this point in the history
  • Loading branch information
maceip committed Feb 12, 2024
1 parent 4b68383 commit 8dbe7c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion deploy/002_deploy_deramp_vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const asset = await (await hre.ethers.getContract('SimpleERC20', deployer)).getAddress();
console.log('vault asset: ', asset);
const { deploy } = hre.deployments;
const useProxy = !hre.network.live;
//const useProxy = !hre.network.live;
const useProxy = true;
const max = ethers.parseEther('1');
const min = ethers.parseEther('.001');
const fee = 0;
Expand Down
10 changes: 5 additions & 5 deletions scripts/onramp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ async function main() {
const benefactor = await ethers.getSigner(simpleERC20Beneficiary);
const bob = await ethers.getSigner(offRamper);
const alice = await ethers.getSigner(onRamper);
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
const backendWallet = new ethers.Wallet("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", provider);
// const backend = await ethers.getSigner(simpleOffchainVerifier);
//const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
//const backendWallet = new ethers.Wallet("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", provider);
const backend = await ethers.getSigner(simpleOffchainVerifier);

console.log("offramper addy: ", bob.address);
console.log("onramper addy: ", alice.address);

console.log("backend addy: ", backendWallet.address);
console.log("backend addy: ", backend);


const erc20Handle = await erc20imp.connect(bob).attach(erc.address);
const see = await erc20Handle.approve(DeRampVault.address, ethers.parseEther('1000000000'));
console.log("using erc20: ", erc.address);
const MyContract2 = await ethers.getContractFactory('DeRampVault');
const DeRampHandle = await MyContract2.connect(backendWallet).attach(DeRampVault.address);
const DeRampHandle = await MyContract2.connect(backend).attach(DeRampVault.address);
//const supp2 = await DeRampHandle.deposit(ethers.parseEther(".05"), bob.address);
const supp2 = await DeRampHandle.onramp(10, bob.address, alice.address);

Expand Down

0 comments on commit 8dbe7c3

Please sign in to comment.