Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get Reward Info ? #233

Open
wshbair opened this issue Jun 3, 2022 · 1 comment
Open

How to get Reward Info ? #233

wshbair opened this issue Jun 3, 2022 · 1 comment

Comments

@wshbair
Copy link

wshbair commented Jun 3, 2022

How to get the RewardInfo using getRewardInfo?
This is how I call the function, but I got only the transaction receipt.

const rewardInfo = await UniswapV3StakerContract.connect(signer).getRewardInfo(
    {
        rewardToken: config.ERC20_REWARD_TOKEN,
        pool: poolAddress,
        startTime: startTime,
        endTime: endTime,
        refundee: await signer.getAddress()
    }, 
    tokenId
);
const receipt = await rewardInfo.wait();
return receipt; 
@Sufiyan-dev
Copy link

Hey firstly don't use await and .wait() in same line. It means the same and secondly check the parameters you have provided by directly interacting with contract and check that it give you the desire output. since its an view function it must return the value.
And as the return value are two. I think this may have some issue.

Do let me know if it solved or not.
And please also share output of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants