Revert "single tx"

This reverts commit 5b7d664e73.
This commit is contained in:
Richa-iitr 2022-09-06 23:01:22 +05:30
parent 5b7d664e73
commit e1e9f9d25e

View File

@ -335,30 +335,30 @@ describe("Import Compound v3 Position", function () {
console.log(`\tstructHash: ${structHash}`);
console.log(`\tblock timestamp: ${(await provider.getBlock(15469858)).timestamp}`);
// console.log(await ethers.provider.getBalance(walletSigner.address));
// const spells1 = [
// {
// connector: "COMPOUND-V3-X",
// method: "toggleAccountManagerWithPermit",
// args: [
// market,
// wallet.address,
// dsaWallet0.address,
// true,
// nonce,
// expiry,
// v,
// ethers.utils.hexlify(r),
// ethers.utils.hexlify(s)
// ]
// }
// ];
// let [targets, calldata] = encodeSpells(spells1);
// console.log(targets);
// console.log(calldata);
// let tx = await dsaWallet0.connect(walletSigner).cast(...encodeSpells(spells1), wallet0.address);
// const receipt = await tx.wait();
// console.log("DSA Permitted as manager");
console.log(await ethers.provider.getBalance(walletSigner.address));
const spells1 = [
{
connector: "COMPOUND-V3-X",
method: "toggleAccountManagerWithPermit",
args: [
market,
wallet.address,
dsaWallet0.address,
true,
nonce,
expiry,
v,
ethers.utils.hexlify(r),
ethers.utils.hexlify(s)
]
}
];
let [targets, calldata] = encodeSpells(spells1);
console.log(targets);
console.log(calldata);
let tx = await dsaWallet0.connect(walletSigner).cast(...encodeSpells(spells1), wallet0.address);
const receipt = await tx.wait();
console.log("DSA Permitted as manager");
const flashSpells = [
{
@ -383,21 +383,6 @@ describe("Import Compound v3 Position", function () {
}
];
const spells = [
{
connector: "COMPOUND-V3-X",
method: "toggleAccountManagerWithPermit",
args: [
market,
wallet.address,
dsaWallet0.address,
true,
nonce,
expiry,
v,
ethers.utils.hexlify(r),
ethers.utils.hexlify(s)
]
},
{
connector: "INSTAPOOL-C",
method: "flashBorrowAndCast",
@ -405,7 +390,7 @@ describe("Import Compound v3 Position", function () {
}
];
let tx = await dsaWallet0.connect(walletSigner).cast(...encodeSpells(spells), wallet0.address);
tx = await dsaWallet0.connect(walletSigner).cast(...encodeSpells(spells), wallet0.address);
await tx.wait();
});