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

Add GhostMarket adapter #238

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

NeoDashboard
Copy link

Add GhostMarket adapter for EVM chains

const nativePrice = new BigNumber(price).dividedBy(10 ** (symbol?.decimals || 0));
const seller = event.returnValues["leftMaker"];
const buyer = event.returnValues["rightMaker"];
const nftContract = event.returnValues["leftAsset"]["data"][0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const nftContract = event.returnValues["leftAsset"]["data"][0];
let params = this.sdk.web3.eth.abi.decodeParameters(['address', 'uint256'], event.returnValues["leftAsset"]["data"]);
let nftContract = params[0];

const seller = event.returnValues["leftMaker"];
const buyer = event.returnValues["rightMaker"];
const nftContract = event.returnValues["leftAsset"]["data"][0];
const tokenId = event.returnValues["leftAsset"]["data"][1];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const tokenId = event.returnValues["leftAsset"]["data"][1];
let tokenId = params[1];

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

Successfully merging this pull request may close these issues.

None yet

2 participants