0

I am trying to interact with the aave curve pool. I have the interface for the curve polygon pools, but they are written in vyper not solidity.

https://github.com/curvefi/curve-contract-polygon/blob/master/contracts/pools/aave/StableSwapAave.vy

For example:

    def add_liquidity(_amounts: uint256[N_COINS], _min_mint_amount: uint256, _use_underlying: bool = False) -> uint256:   
@notice Deposit coins into the pool
    @param _amounts List of amounts of coins to deposit
    @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit
    @param _use_underlying If True, deposit underlying assets instead of aTokens
    @return Amount of LP tokens received by depositing

How do I interact with this contract in solidity? Thanks!

1 Answer 1

-1

here is a collection of the all interfaces related to curve on polygon : https://github.com/curvefi/curve-contract-polygon/tree/master/interfaces

Alternatively, you can visit polygonscan on a specific contract address and copy ABI from there.

You can also install the vyper compiler locally and then compile a specific contract to get abi output, command would look something like this:

vyper -f abi  contract.vy > contract.json
1
  • How do I use the ABI in solidity? For example, the function I put in the question.
    – DeviousDev
    Commented Jul 4, 2021 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.