Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
fix: add V4 NFT docs to algolia_meta
Browse files Browse the repository at this point in the history
  • Loading branch information
kimpers committed Jan 31, 2022
1 parent 6e6328b commit 318c074
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> Note: This feature is in beta and is subject to change. Testnet deployments coming soon. Mainnet deployments are pending audit.
> We invite you to join our [Discord](https://discord.com/invite/YyG9fkK) and share feedback in the [#dev-feature-feedback](https://discord.com/channels/435912040142602260/936366257521954857).
We are adding support for ERC721<>ERC20 and ERC1155<>ERC20 orders to 0x v4. Contracts can be found [here](https://github.com/0xProject/protocol/tree/refactor/nft-orders/contracts/zero-ex/contracts/src/features/nft_orders). Contract interfaces are also in [this doc](https://0x.org/docs/guides/0x-v4-nft-contract-interfaces)
We are adding support for ERC721<\>ERC20 and ERC1155<\>ERC20 orders to 0x v4. Contracts can be found [here](https://github.com/0xProject/protocol/tree/refactor/nft-orders/contracts/zero-ex/contracts/src/features/nft_orders). Contract interfaces are also in [this doc](https://0x.org/docs/guides/0x-v4-nft-contract-interfaces)

## Basics

Expand Down Expand Up @@ -132,7 +132,7 @@ For expensive chains like Ethereum mainnet, disbursing multiple fees would be co
A **sell** order must use WETH instead of ETH, since we require the ERC20 `transferFrom` functionality to transfer WETH from the maker to the taker. Even so, the taker can choose to *receive* ETH when filling a WETH sell order by setting the `unwrapNativeToken` parameter to `true` in `sellERC721` or `sellERC1155`.
A **buy** order can specify either ETH or WETH, i.e. the buyer can indicate whether they would like to receive ETH or WETH. A ** WETH sell order can be filled by a taker using ETH: the `buyERC721` and `buyERC1155` functions are `payable` and the `msg.value` can be used to fill a WETH sell order.
A **buy** order can specify either ETH or WETH, i.e. the buyer can indicate whether they would like to receive ETH or WETH. A **WETH** sell order can be filled by a taker using ETH: the `buyERC721` and `buyERC1155` functions are `payable` and the `msg.value` can be used to fill a WETH sell order.
## `onERC721Received` and `onERC1155Received`
Expand Down
2 changes: 1 addition & 1 deletion ts/components/governance/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export const GovernanceHero: React.FC<GovernanceHeroProps> = (props) => {
const wCeloAmount = Web3Wrapper.toUnitAmount(wCeloBalance, 18);
const zrxUSD = zrxAmount.multipliedBy(res['0x'].usd);
const maticUSD = maticAmount.multipliedBy(res['matic-network'].usd);
const wCeloUSD = wCeloAmount.multipliedBy(res['celo'].usd);
const wCeloUSD = wCeloAmount.multipliedBy(res.celo.usd);

const treasuryTokenTransferData = await backendClient.getTreasuryTokenTransfersAsync();
const totalDistributed = parseTotalDistributed(treasuryTokenTransferData);
Expand Down
10 changes: 5 additions & 5 deletions ts/pages/governance/treasury_breakdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ export const TreasuryBreakdown: React.FC<TreasuryBreakdownProps> = (props) => {
const treasuryTokenPrices = await backendClient.getTreasuryTokenPricesAsync();
const getTokenPrice = (tokenSymbol: string) => {
const symbolIdMap: { [symbol: string]: string } = {
'ZRX': '0x',
'MATIC': 'matic-network',
'wCELO': 'celo'
}
ZRX: '0x',
MATIC: 'matic-network',
wCELO: 'celo',
};
const priceId = symbolIdMap[tokenSymbol];
const price = treasuryTokenPrices[priceId].usd;

return price;
}
};
const zrxAmount = Web3Wrapper.toUnitAmount(zrxBalance, 18);
const maticAmount = Web3Wrapper.toUnitAmount(maticBalance, 18);
const wCeloAmount = Web3Wrapper.toUnitAmount(wCeloBalance, 18);
Expand Down
18 changes: 18 additions & 0 deletions ts/utils/algolia_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@
}
},
"guides": {
"0x-v4-nft-features-overview": {
"title": "0x V4 NFT Features Overview",
"subtitle": "Learn about the NFT features of the 0x V4 Protocol",
"description": "Learn about the NFT features of the 0x V4 Protocol",
"tags": ["NFT", "Protocol Developer"],
"topics": ["NFT", "Protocol Developer"],
"difficulty": "Intermediate",
"path": "guides/0x-v4-nft-features-overview.mdx"
},
"0x-v4-nft-contract-interfaces": {
"title": "0x V4 NFT contract interfaces",
"subtitle": "Learn the in-depth details about the 0x V4 NFT contract interfaces",
"description": "Learn the in-depth details about the 0x V4 NFT contract interfaces",
"tags": ["NFT", "Protocol Developer"],
"topics": ["NFT", "Protocol Developer"],
"difficulty": "Intermediate",
"path": "guides/0x-v4-nft-contract-interfaces.mdx"
},
"migrate-0x-api-from-v0-to-v1": {
"title": "Migrate 0x API integrations from the v0 to v1 endpoints",
"subtitle": "Learn how to migrate your existing 0x API integration to use the v1 endpoints",
Expand Down

1 comment on commit 318c074

@vercel
Copy link

@vercel vercel bot commented on 318c074 Jan 31, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.