Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions packages/contracts/scripts/bKeeper-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// todo transefer 1000 ETH to bamm
const hre = require("hardhat");

const send1000ETH = async () => {

const to = "0x04208f296039f482810b550ae0d68c3e1a5eb719"
const from = "0x8e15a22853A0A60a0FBB0d875055A8E66cff0235"
const value = web3.utils.toWei("1000")
await hre.network.provider.request({
method: "hardhat_impersonateAccount",
params: [from],
})
var send = await web3.eth.sendTransaction({ from, to, value });
return send
}

const {run} = require("../../liquidator/bKeeper")

const init = async () =>{
try{
await send1000ETH()
let balance = await web3.eth.getBalance("0x04208f296039f482810b550ae0d68c3e1a5eb719"); //Will give value in.
console.log(balance.toString())
await run()
balance = await web3.eth.getBalance("0x04208f296039f482810b550ae0d68c3e1a5eb719"); //Will give value in.
console.log(balance.toString())
} catch (err){
console.error(err)
}
}

init()
Loading