Giter Site home page Giter Site logo

aave / aave-sandbox Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 14.0 413 KB

Sandbox of Aave Markets that replicates a forked production environment. The environment is envisioned for testing liquidations or other integrations.

License: MIT License

TypeScript 99.41% Solidity 0.59%

aave-sandbox's People

Contributors

0xgusmccrae avatar defispartan avatar foodaka avatar kartojal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aave-sandbox's Issues

feed-market errors on various markets

feed-market on main-v2 fails with error 3: Reserve frozen

feed-market also fails intermittently on V3 production markets for supply cap, borrow cap, and debt ceiling errors

This command should adjust actions and amounts based on reserve state.

Make Contacts Deployed to the Network Persistent

I've written a contract which interacts with the sandbox network and I can successfully deploy it and interact with it, however, the state is not persisted on the local network. It's strange because my account balances persist. I've tried adding saveDeployments:true to both the hardhat and localhost network in the hardhat.config.ts in my project and the aave-sandbox repo but that had no effect on the issue. Is there additionally configuration I need to do to make this work or is this functionality simply not supported?

typechain-types is gone

Hello, it seems this file is missing from the repo, so it can't run

npm run node:fork:polygon-v3

> node:fork:polygon-v3
> FORK=polygon MARKET=polygon-v3 npm run node


> node
> npx hardhat node

An unexpected error occurred:

helpers/utils.ts:16:8 - error TS2307: Cannot find module '../typechain-types' or its corresponding type declarations.

16 } from "../typechain-types";
          ~~~~~~~~~~~~~~~~~~~~

It's used to import these objects:

import {
  IERC20Detailed,
  IERC20DetailedBytes,
  IERC20,
} from "../typechain-types";

FORK in feed-market:arc

I think the feed-market:arc command needs a FORKvalue.

Either in package.json:

"feed-market:arc": "FORK=main hardhat --network localhost feed-market --market arc"

Or updating the instructions in the README file:

FORK=main nom run feed-market:arc

Unable to perform feed account for main-v2

EDIT 1 -> May be related to #4 . I saw the same error, however, after updating, the below error took stage.
EDIT 2 -> Appears to be a Action cannot be performed because the reserve is frozen error. See https://docs.aave.com/developers/v/2.0/guides/troubleshooting-errors.

Description:

Unable to perform feed account for main v2 via -> npm run feed-market:main-v2.

Logs Extract:

Balances slot not found for 0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd
[warning] balance storage layout not found for [
  'GUSD',
  '0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd',
  symbol: 'GUSD',
  tokenAddress: '0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd'
]

Balances slot not found for 0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5
[warning] balance storage layout not found for [
  'renFIL',
  '0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5',
  symbol: 'renFIL',
  tokenAddress: '0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5'
]

Balances slot not found for 0xD46bA6D942050d489DBd938a2C909A5d5039A161
[warning] balance storage layout not found for [
  'AMPL',
  '0xD46bA6D942050d489DBd938a2C909A5d5039A161',
  symbol: 'AMPL',
  tokenAddress: '0xD46bA6D942050d489DBd938a2C909A5d5039A161'
]

- Faucet ERC20 reserves to users

An unexpected error occurred:

ProviderError: Error: VM Exception while processing transaction: reverted with reason string '3'
    at HttpProvider.request (/Users/**USERNAME_REDACTED**/Documents/aave-sandbox/node_modules/hardhat/src/internal/core/providers/http.ts:74:19)
    at HDWalletProvider.request (/Users/**USERNAME_REDACTED**/Documents/aave-sandbox/node_modules/hardhat/src/internal/core/providers/accounts.ts:188:34)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async EthersProviderWrapper.send (/Users/**USERNAME_REDACTED**/Documents/aave-sandbox/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)

Can anyone please assist in shedding some light on potential causes?

Many thanks!

feed-accounts:polygon-v3 - Not working

So I was following the steps to try the sandbox, and when trying the step to feed accounts I received this error:

run:
npm run feed-accounts:polygon-v3 --accounts 0xa532e51B96230815e42638539Ad95aCE8727f127
got
Error HH306: The '--accounts' parameter expects a value, but none was passed.

I saw #6 and tried hardcoding the tokens and addresses, but the code asks me for a Token[] type not a string, and I don't know how to pass the adresses as a Token[] type.

An unexpected error occurred:

tasks/sandbox/feed-accounts.ts:31:40 - error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Token[]'.
  Type 'string' is not assignable to type 'Token'.

31       await feedBalances(userAccounts, assets);

Unable to spin up hardhat sanbox node

@kartojal @defispartan I am unable to spin up a hardhat sandbox node. So I have followed through the github readme and gotten till fork aave markets. But I am unable to find a valid block number and latest block url. I have come up with a older one from the internet but it throws an error. What should I do ?
Screenshot 2023-03-10 at 22 48 26

typechain-types missing

$ npm run node:fork:polygon-v3

node:fork:polygon-v3
FORK=polygon MARKET=polygon-v3 npm run node

node
npx hardhat node

An unexpected error occurred:

config/types.ts:95:72 - error TS2307: Cannot find module './../typechain-types/@aave/core-v3/contracts/misc/AaveProtocolDataProvider' or its corresponding type declarations.

95 export { AaveProtocolDataProvider as AaveProtocolDataProviderV3 } from "./../typechain-types/@aave/core-v3/contracts/misc/AaveProtocolDataProvider";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
config/types.ts:96:72 - error TS2307: Cannot find module './../typechain-types/@aave/protocol-v2/contracts/misc/AaveProtocolDataProvider' or its corresponding type declarations.

96 export { AaveProtocolDataProvider as AaveProtocolDataProviderV2 } from "./../typechain-types/@aave/protocol-v2/contracts/misc/AaveProtocolDataProvider";

Unable to perform feed account for main-v2

Unable to perform feed account for main-v2

  1. Spin up main-v2 fork: npm run node:fork:main-v2
  2. Attempt to feed the account with the balances: npm run feed-accounts:main-v2 -- --accounts 0x976EA74026E726554dB657fA54763abd0C3a0aa9

Error:

[warning] balance storage layout not found for [
  'AMPL',
  '0xD46bA6D942050d489DBd938a2C909A5d5039A161',
  symbol: 'AMPL',
  tokenAddress: '0xD46bA6D942050d489DBd938a2C909A5d5039A161'
]
- Succesfully changed the balance of input addresses to:
An unexpected error occurred:

Error: cannot find artifact "IERC20DetailedBytes"
    at Object.getArtifact (/com.docker.devenvironments.code/node_modules/hardhat-deploy/src/DeploymentsManager.ts:213:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getContract (/com.docker.devenvironments.code/helpers/utils.ts:30:20)
    at async getTokenSymbol (/com.docker.devenvironments.code/helpers/utils.ts:183:33)
    at async /com.docker.devenvironments.code/helpers/utils.ts:218:15

Expected: Fed Accounts with no errors

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.