yuichiroaoki / inverse-finance-exploit

Oracle Manipulation Attack on Inverse Finance

Home Page:https://medium.com/coinmonks/how-the-oracle-manipulation-attack-happened-to-inverse-finance-cb95e5343034

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError [ERR_INVALID_URL]: Invalid URL

whatifsec opened this issue · comments

inverse-finance-exploit % **yarn attack**
TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:387:5)
    at URL.onParseError (node:internal/url:564:9)
    at new URL (node:internal/url:640:5)
    at new HttpProvider (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/core/providers/http.ts:51:17)
    at makeForkClient (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/hardhat-network/provider/utils/makeForkClient.ts:34:20)
    at Function.create (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:161:31)
    at HardhatNetworkProvider._init (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:251:46)
    at async HardhatNetworkProvider._send (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:192:5)
    at async HardhatNetworkProvider.request (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:118:18)
    at async EthersProviderWrapper.send (/Users/docker/Desktop/test1/inverse-finance-exploit/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20) {
  input: 'ALCHEMY_API_KEY(DELETED)',
  code: 'ERR_INVALID_URL'
}

The problem was that in .env I pasted just API key, instead of full URL with API key for ALCHEMY_MAINNET_RPC_URL variable. After I corrected this one - script done well.