Git Product home page Git Product logo

aave-liquidity-pool-tutorial's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aave-liquidity-pool-tutorial's Issues

Hi! I have an error trying to run script from your tutorial. I will be glad if You can help #1

The error is:

Compiled 1 Solidity file successfully
deploying...
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="Transaction reverted: function returned an unexpected amount of data", method="estimateGas", transaction={"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","data":"0x60e06040527307c725d58437504ca5f814ae406e70e21c5e8e9e73ffffffffffffffffffffffffffffffffffffffff1660c09073ffffffffffffffffffffffffffffffffffffffff168152503480156200005857600080fd5b50604051620010d0380380620010d083398181016040528101906200007e91906200024d565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505060805173ffffffffffffffffffffffffffffffffffffffff1663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012691906200024d565b73ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c051600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200027f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200021582620001e8565b9050919050565b620002278162000208565b81146200023357600080fd5b50565b60008151905062000247816200021c565b92915050565b600060208284031215620002665762000265620001e3565b5b6000620002768482850162000236565b91505092915050565b60805160a05160c051610e0f620002c1600039600050506000818161057a015281816105ae0152818161066a015261070c015260006102760152610e0f6000f3fe60806040526004361061008a5760003560e01c80637535d246116100595780637535d246146101645780638a11069c1461018f578063b39e3771146101cc578063bf92857c146101f5578063f8b2cb4f1461023757610091565b80630542975c146100965780632e8984eb146100c157806351cff8d9146100fe57806370ca79cd1461012757610091565b3661009157005b600080fd5b3480156100a257600080fd5b506100ab610274565b6040516100b891906108bb565b60405180910390f35b3480156100cd57600080fd5b506100e860048036038101906100e3919061094f565b610298565b6040516100f591906109aa565b60405180910390f35b34801561010a57600080fd5b50610125600480360381019061012091906109c5565b610342565b005b34801561013357600080fd5b5061014e600480360381019061014991906109c5565b6104d1565b60405161015b9190610a01565b60405180910390f35b34801561017057600080fd5b50610179610578565b6040516101869190610a3d565b60405180910390f35b34801561019b57600080fd5b506101b660048036038101906101b19190610a58565b61059c565b6040516101c39190610a01565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610a58565b610657565b005b34801561020157600080fd5b5061021c600480360381019061021791906109c5565b610701565b60405161022e96959493929190610a98565b60405180910390f35b34801561024357600080fd5b5061025e600480360381019061025991906109c5565b6107b9565b60405161026b9190610a01565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b383856040518363ffffffff1660e01b81526004016102f7929190610b08565b6020604051808303816000875af1158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a9190610b5d565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c790610c0d565b60405180910390fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161042b9190610c2d565b602060405180830381865afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c9190610c5d565b6040518363ffffffff1660e01b8152600401610489929190610b08565b6020604051808303816000875af11580156104a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cc9190610b5d565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30846040518363ffffffff1660e01b8152600401610530929190610c8a565b602060405180830381865afa15801561054d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105719190610c5d565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080839050600083905060003090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166369328dec8484846040518463ffffffff1660e01b815260040161060993929190610cb3565b6020604051808303816000875af1158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c9190610c5d565b935050505092915050565b60008290506000829050600030905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663617ba037858585856040518563ffffffff1660e01b81526004016106c79493929190610d07565b600060405180830381600087803b1580156106e157600080fd5b505af11580156106f5573d6000803e3d6000fd5b50505050505050505050565b6000806000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bf92857c886040518263ffffffff1660e01b81526004016107639190610c2d565b60c060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190610d4c565b95509550955095509550955091939550919395565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107f49190610c2d565b602060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108359190610c5d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061088161087c6108778461083c565b61085c565b61083c565b9050919050565b600061089382610866565b9050919050565b60006108a582610888565b9050919050565b6108b58161089a565b82525050565b60006020820190506108d060008301846108ac565b92915050565b600080fd5b6000819050919050565b6108ee816108db565b81146108f957600080fd5b50565b60008135905061090b816108e5565b92915050565b600061091c8261083c565b9050919050565b61092c81610911565b811461093757600080fd5b50565b60008135905061094981610923565b92915050565b60008060408385031215610966576109656108d6565b5b6000610974858286016108fc565b92505060206109858582860161093a565b9150509250929050565b60008115159050919050565b6109a48161098f565b82525050565b60006020820190506109bf600083018461099b565b92915050565b6000602082840312156109db576109da6108d6565b5b60006109e98482850161093a565b91505092915050565b6109fb816108db565b82525050565b6000602082019050610a1660008301846109f2565b92915050565b6000610a2782610888565b9050919050565b610a3781610a1c565b82525050565b6000602082019050610a526000830184610a2e565b92915050565b60008060408385031215610a6f57610a6e6108d6565b5b6000610a7d8582860161093a565b9250506020610a8e858286016108fc565b9150509250929050565b600060c082019050610aad60008301896109f2565b610aba60208301886109f2565b610ac760408301876109f2565b610ad460608301866109f2565b610ae160808301856109f2565b610aee60a08301846109f2565b979650505050505050565b610b0281610911565b82525050565b6000604082019050610b1d6000830185610af9565b610b2a60208301846109f2565b9392505050565b610b3a8161098f565b8114610b4557600080fd5b50565b600081519050610b5781610b31565b92915050565b600060208284031215610b7357610b726108d6565b5b6000610b8184828501610b48565b91505092915050565b600082825260208201905092915050565b7f4f6e6c792074686520636f6e7472616374206f776e65722063616e2063616c6c60008201527f20746869732066756e6374696f6e000000000000000000000000000000000000602082015250565b6000610bf7602e83610b8a565b9150610c0282610b9b565b604082019050919050565b60006020820190508181036000830152610c2681610bea565b9050919050565b6000602082019050610c426000830184610af9565b92915050565b600081519050610c57816108e5565b92915050565b600060208284031215610c7357610c726108d6565b5b6000610c8184828501610c48565b91505092915050565b6000604082019050610c9f6000830185610af9565b610cac6020830184610af9565b9392505050565b6000606082019050610cc86000830186610af9565b610cd560208301856109f2565b610ce26040830184610af9565b949350505050565b600061ffff82169050919050565b610d0181610cea565b82525050565b6000608082019050610d1c6000830187610af9565b610d2960208301866109f2565b610d366040830185610af9565b610d436060830184610cf8565b95945050505050565b60008060008060008060c08789031215610d6957610d686108d6565b5b6000610d7789828a01610c48565b9650506020610d8889828a01610c48565b9550506040610d9989828a01610c48565b9450506060610daa89828a01610c48565b9350506080610dbb89828a01610c48565b92505060a0610dcc89828a01610c48565b915050929550929550929556fea2646970667358221220124ecae33313b300bfafd560f14929021844447beaacef83cbed611ac05aec2d64736f6c634300080a0033000000000000000000000000c4dcb5126a3afed129bc3668ea19285a9f56d15d","accessList":null}, error={"stackTrace":[{"type":13,"sourceReference":{"function":"constructor","contract":"MarketInteractions","sourceName":"contracts/MarketInteractions.sol","sourceContent":"// SPDX-License-Identifier: MIT\r\npragma solidity 0.8.10;\r\n\r\nimport {IPool} from \"@aave/core-v3/contracts/interfaces/IPool.sol\";\r\nimport {IPoolAddressesProvider} from \"@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol\";\r\nimport {IERC20} from \"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\";\r\n\r\ncontract MarketInteractions {\r\n    address payable owner;\r\n\r\n    IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;\r\n    IPool public immutable POOL;\r\n\r\n    address private immutable linkAddress =\r\n        0x07C725d58437504CA5f814AE406e70E21C5e8e9e;\r\n    IERC20 private link;\r\n\r\n    constructor(address _addressProvider) {\r\n        ADDRESSES_PROVIDER = IPoolAddressesProvider(_addressProvider);\r\n
     POOL = IPool(ADDRESSES_PROVIDER.getPool());\r\n        owner = payable(msg.sender);\r\n        link = IERC20(linkAddress);\r\n
  }\r\n\r\n    function supplyLiquidity(address _tokenAddress, uint256 _amount) external {\r\n        address asset = _tokenAddress;\r\n        uint256 amount = _amount;\r\n        address onBehalfOf = address(this);\r\n        uint16 referralCode = 0;\r\n\r\n
  POOL.supply(asset, amount, onBehalfOf, referralCode);\r\n    }\r\n\r\n    function withdrawlLiquidity(address _tokenAddress, uint256 _amount)\r\n        external\r\n        returns (uint256)\r\n    {\r\n        address asset = _tokenAddress;\r\n        uint256 amount = _amount;\r\n        address to = address(this);\r\n\r\n        return POOL.withdraw(asset, amount, to);\r\n    }\r\n\r\n    function getUserAccountData(address _userAddress)\r\n        external\r\n        view\r\n        returns (\r\n            uint256 totalCollateralBase,\r\n            uint256 totalDebtBase,\r\n            uint256 availableBorrowsBase,\r\n            uint256 currentLiquidationThreshold,\r\n            uint256 ltv,\r\n            uint256 healthFactor\r\n        )\r\n    {\r\n        return POOL.getUserAccountData(_userAddress);\r\n    }\r\n\r\n    function approveLINK(uint256 _amount, address _poolContractAddress)\r\n        external\r\n        returns (bool)\r\n    {\r\n        return link.approve(_poolContractAddress, _amount);\r\n    }\r\n\r\n    function allowanceLINK(address _poolContractAddress)\r\n        external\r\n        view\r\n        returns (uint256)\r\n    {\r\n        return link.allowance(address(this), _poolContractAddress);\r\n    }\r\n\r\n    function getBalance(address _tokenAddress) external view returns (uint256) {\r\n        return IERC20(_tokenAddress).balanceOf(address(this));\r\n    }\r\n\r\n    function withdraw(address _tokenAddress) external onlyOwner {\r\n        IERC20 token = IERC20(_tokenAddress);\r\n        token.transfer(msg.sender, token.balanceOf(address(this)));\r\n    }\r\n\r\n    modifier onlyOwner() {\r\n        require(\r\n            msg.sender == owner,\r\n            \"Only the contract owner can call this function\"\r\n        );\r\n        _;\r\n    }\r\n\r\n    receive() external payable {}\r\n}\r\n","line":20,"range":[756,784]}}],"data":"0x"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)
    at Logger.makeError (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\logger\src.ts\index.ts:269:28)
    at Logger.throwError (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\logger\src.ts\index.ts:281:20)
    at checkError (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:78:20)
    at EthersProviderWrapper.<anonymous> (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:642:20)
    at step (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:48:23)
    at Object.throw (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:29:53)
    at rejected (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:21:65)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at listOnTimeout (node:internal/timers:533:9) {
  reason: 'Transaction reverted: function returned an unexpected amount of data',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  method: 'estimateGas',
  transaction: {
    from: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
    data: '0x60e06040527307c725d58437504ca5f814ae406e70e21c5e8e9e73ffffffffffffffffffffffffffffffffffffffff1660c09073ffffffffffffffffffffffffffffffffffffffff168152503480156200005857600080fd5b50604051620010d0380380620010d083398181016040528101906200007e91906200024d565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505060805173ffffffffffffffffffffffffffffffffffffffff1663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200012691906200024d565b73ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1681525050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c051600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506200027f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200021582620001e8565b9050919050565b620002278162000208565b81146200023357600080fd5b50565b60008151905062000247816200021c565b92915050565b600060208284031215620002665762000265620001e3565b5b6000620002768482850162000236565b91505092915050565b60805160a05160c051610e0f620002c1600039600050506000818161057a015281816105ae0152818161066a015261070c015260006102760152610e0f6000f3fe60806040526004361061008a5760003560e01c80637535d246116100595780637535d246146101645780638a11069c1461018f578063b39e3771146101cc578063bf92857c146101f5578063f8b2cb4f1461023757610091565b80630542975c146100965780632e8984eb146100c157806351cff8d9146100fe57806370ca79cd1461012757610091565b3661009157005b600080fd5b3480156100a257600080fd5b506100ab610274565b6040516100b891906108bb565b60405180910390f35b3480156100cd57600080fd5b506100e860048036038101906100e3919061094f565b610298565b6040516100f591906109aa565b60405180910390f35b34801561010a57600080fd5b50610125600480360381019061012091906109c5565b610342565b005b34801561013357600080fd5b5061014e600480360381019061014991906109c5565b6104d1565b60405161015b9190610a01565b60405180910390f35b34801561017057600080fd5b50610179610578565b6040516101869190610a3d565b60405180910390f35b34801561019b57600080fd5b506101b660048036038101906101b19190610a58565b61059c565b6040516101c39190610a01565b60405180910390f35b3480156101d857600080fd5b506101f360048036038101906101ee9190610a58565b610657565b005b34801561020157600080fd5b5061021c600480360381019061021791906109c5565b610701565b60405161022e96959493929190610a98565b60405180910390f35b34801561024357600080fd5b5061025e600480360381019061025991906109c5565b6107b9565b60405161026b9190610a01565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b383856040518363ffffffff1660e01b81526004016102f7929190610b08565b6020604051808303816000875af1158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a9190610b5d565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103c790610c0d565b60405180910390fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161042b9190610c2d565b602060405180830381865afa158015610448573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046c9190610c5d565b6040518363ffffffff1660e01b8152600401610489929190610b08565b6020604051808303816000875af11580156104a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cc9190610b5d565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30846040518363ffffffff1660e01b8152600401610530929190610c8a565b602060405180830381865afa15801561054d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105719190610c5d565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080839050600083905060003090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166369328dec8484846040518463ffffffff1660e01b815260040161060993929190610cb3565b6020604051808303816000875af1158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c9190610c5d565b935050505092915050565b60008290506000829050600030905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663617ba037858585856040518563ffffffff1660e01b81526004016106c79493929190610d07565b600060405180830381600087803b1580156106e157600080fd5b505af11580156106f5573d6000803e3d6000fd5b50505050505050505050565b6000806000806000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bf92857c886040518263ffffffff1660e01b81526004016107639190610c2d565b60c060405180830381865afa158015610780573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a49190610d4c565b95509550955095509550955091939550919395565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016107f49190610c2d565b602060405180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108359190610c5d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061088161087c6108778461083c565b61085c565b61083c565b9050919050565b600061089382610866565b9050919050565b60006108a582610888565b9050919050565b6108b58161089a565b82525050565b60006020820190506108d060008301846108ac565b92915050565b600080fd5b6000819050919050565b6108ee816108db565b81146108f957600080fd5b50565b60008135905061090b816108e5565b92915050565b600061091c8261083c565b9050919050565b61092c81610911565b811461093757600080fd5b50565b60008135905061094981610923565b92915050565b60008060408385031215610966576109656108d6565b5b6000610974858286016108fc565b92505060206109858582860161093a565b9150509250929050565b60008115159050919050565b6109a48161098f565b82525050565b60006020820190506109bf600083018461099b565b92915050565b6000602082840312156109db576109da6108d6565b5b60006109e98482850161093a565b91505092915050565b6109fb816108db565b82525050565b6000602082019050610a1660008301846109f2565b92915050565b6000610a2782610888565b9050919050565b610a3781610a1c565b82525050565b6000602082019050610a526000830184610a2e565b92915050565b60008060408385031215610a6f57610a6e6108d6565b5b6000610a7d8582860161093a565b9250506020610a8e858286016108fc565b9150509250929050565b600060c082019050610aad60008301896109f2565b610aba60208301886109f2565b610ac760408301876109f2565b610ad460608301866109f2565b610ae160808301856109f2565b610aee60a08301846109f2565b979650505050505050565b610b0281610911565b82525050565b6000604082019050610b1d6000830185610af9565b610b2a60208301846109f2565b9392505050565b610b3a8161098f565b8114610b4557600080fd5b50565b600081519050610b5781610b31565b92915050565b600060208284031215610b7357610b726108d6565b5b6000610b8184828501610b48565b91505092915050565b600082825260208201905092915050565b7f4f6e6c792074686520636f6e7472616374206f776e65722063616e2063616c6c60008201527f20746869732066756e6374696f6e000000000000000000000000000000000000602082015250565b6000610bf7602e83610b8a565b9150610c0282610b9b565b604082019050919050565b60006020820190508181036000830152610c2681610bea565b9050919050565b6000602082019050610c426000830184610af9565b92915050565b600081519050610c57816108e5565b92915050565b600060208284031215610c7357610c726108d6565b5b6000610c8184828501610c48565b91505092915050565b6000604082019050610c9f6000830185610af9565b610cac6020830184610af9565b9392505050565b6000606082019050610cc86000830186610af9565b610cd560208301856109f2565b610ce26040830184610af9565b949350505050565b600061ffff82169050919050565b610d0181610cea565b82525050565b6000608082019050610d1c6000830187610af9565b610d2960208301866109f2565b610d366040830185610af9565b610d436060830184610cf8565b95945050505050565b60008060008060008060c08789031215610d6957610d686108d6565b5b6000610d7789828a01610c48565b9650506020610d8889828a01610c48565b9550506040610d9989828a01610c48565b9450506060610daa89828a01610c48565b9350506080610dbb89828a01610c48565b92505060a0610dcc89828a01610c48565b915050929550929550929556fea2646970667358221220124ecae33313b300bfafd560f14929021844447beaacef83cbed611ac05aec2d64736f6c634300080a0033000000000000000000000000c4dcb5126a3afed129bc3668ea19285a9f56d15d',
    accessList: null
  },
  error: Error: Transaction reverted: function returned an unexpected amount of data
      at MarketInteractions.constructor (contracts/MarketInteractions.sol:20)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:533:9)
      at processTimers (node:internal/timers:507:7)
      at EthModule._estimateGasAction (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\hardhat\src\internal\hardhat-network\provider\modules\eth.ts:429:7)
      at HardhatNetworkProvider.request (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\hardhat\src\internal\hardhat-network\provider\provider.ts:118:18)
      at EthersProviderWrapper.send (D:\Programming\Blockchain\Projects\aave-liquidity-pool-tutorial\node_modules\@nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20)
}
error Command failed with exit code 1.

I am just doing yarn hardhat run .\scripts\deployMarketInteractions.js
Do you have any ideas why this happens?

I believe it is because of this line POOL = IPool(ADDRESSES_PROVIDER.getPool());, but I don't know why it doesn't work on my PC but worked in your video. I figured that calling getPool() gives this error, but still... why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.