SHARE
TWEET

code

a guest Aug 18th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const ethers = require('ethers')
  2.  
  3. let abi = [
  4.     "event LogLiquidate(address indexed solidAccountOwner,uint256 solidAccountNumber,address indexed liquidAccountOwner,uint256 liquidAccountNumber,uint256 heldMarket,uint256 owedMarket,BalanceUpdate solidHeldUpdate,BalanceUpdate solidOwedUpdate,BalanceUpdate liquidHeldUpdate,BalanceUpdate liquidOwedUpdate)"
  5. ];
  6.  
  7. let infuraProvider = new ethers.providers.InfuraProvider('mainnet');
  8. let soloContract = new ethers.Contract("0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e", abi, infuraProvider)
  9.  
  10. filter = soloContract.filters.LogLiquidate()
  11. filter.fromBlock = 7575711;
  12. filter.toBlock = "latest";
  13.  
  14. infuraProvider.getLogs(filter).then((logs) => {
  15.     logs.forEach((log) => {
  16.         console.log(log)
  17.         //const data = soloContract.interface.parseLog(log)
  18.         //console.log(data)
  19.     })
  20. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top