Skip to content

Instantly share code, notes, and snippets.

@Sowmayjain
Created July 9, 2020 16:44
Show Gist options
  • Save Sowmayjain/95da777f8f75797f8a9e903fdbb76282 to your computer and use it in GitHub Desktop.
Save Sowmayjain/95da777f8f75797f8a9e903fdbb76282 to your computer and use it in GitHub Desktop.
let daiAddress = dsa.tokens.info.dai.address;
let flashloanAmount = "1000000000000000000000000";
let spells = dsa.Spell();
spells.add({
connector: "instapool",
method: "flashBorrow",
args: [daiAddress, flashloanAmount, 0, 0]
});
spells.add({
connector: "instapool",
method: "flashPayback",
args: [daiAddress, 0, 0]
});
dsa.cast(spells);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment