-
Notifications
You must be signed in to change notification settings - Fork 51
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
Ethernity Satoshi staking #209
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: mrmacp <[email protected]>
* @returns | ||
*/ | ||
getStakedTokenIds(owner: string): Promise<BigNumber[]> { | ||
const contract = Coco__factory.connect(this.contractAddress, this.provider); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be SatoshiStaking__factory
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raymondfeng Ooops thanks for spotting that. Question: the getStakedTokenIds() must return staked NFT token IDs from owner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok thanks @raymondfeng I'm checking if the contract has such function, at a glance it doesn't (it was written a while ago)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @raymondfeng questions:
- Does this adapter run on the EVM? I can't do an http call inside getStakedTokenIds() right?
- We also have an ERN fixed staking contract, that one will work - should I do a new pull request or just include it in the current one?
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the adapter runs with our backend and you can call REST apis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the issue as I commented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @raymondfeng
I changed the function so it calls the endpoint instead of a contract function. Questions:
- The tests are failing for me
32) gets staked token balances for FlooringProtocol:
Error: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (transaction={"to":"0x49AD262C49C7aA708Cc2DF262eD53B64A17Dd5EE","data":"0xe89a7aed","accessList":null}, code=CALL_EXCEPTION, version=providers/5.7.1)
is this something sporadic or failing from my machine?
- Is /src/types/SatoshiStaking.ts still needed? (since I am not calling the contract anymore from the adapter)
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the abi json.
async getStakedTokenIds(owner: string): Promise<BigNumber[]> { | ||
const url = `https://api.ethernity.io/api/v2/satoshi-staking/${owner}/staked`; | ||
try { | ||
const response = await fetch(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use getFetch()
from @collabland/common
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See an example at
const fetch = getFetch(); |
Requesting addition of Ethernity Satoshi staking contract - thanks!