0

Trying to directly interact with a contract calling a specific function here

https://arbiscan.io/address/0xa2adf5ef43226a4a6a7c6b360f486bdaf2712bc8#writeProxyContract

  1. exitFarming

In what format are you supposed to enter the values in "key (tuple)"?

something["0xa","0xb","0xc"] results in "something not defined"

Thanks

1 Answer 1

0

In exitFarming() function, the key (tuple) is of type struct IncentiveKey, that is defined in the IIncentiveKey interface as:

/// @param rewardToken The token being distributed as a reward
/// @param bonusRewardToken The bonus token being distributed as a reward
/// @param pool The Algebra pool
/// @param startTime The time when the incentive program begins
/// @param endTime The time when rewards stop accruing
struct IncentiveKey {
    IERC20Minimal rewardToken;
    IERC20Minimal bonusRewardToken;
    IAlgebraPool pool;
    uint256 startTime;
    uint256 endTime;
}

In this:

  • rewardToken and bonusRewardToken are the addresses of token contracts.
  • pool is the address of the AlgebraPool contract.
  • startTime and endTime are the timestamps.

So, the structure of the tuple to be passed as param would be:

["0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", 0, 0]

You can replace these zero placeholders with the actual addresses and timestamp values as per your use case.

You can also take reference from the values being passed in this transaction corresponding to enterFarming() function, as it's also accepting the same tuple format, when you decode the corresponding input data:

enter image description here

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.