add cookbook*

pull/5147/head
yann300 5 months ago
parent 663fe2dd01
commit d89cce826f
  1. 3
      apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx
  2. 18
      apps/remix-ide/src/app/plugins/templates-selection/templates.ts
  3. 1
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-section.tsx
  4. 54
      libs/remix-ui/workspace/src/lib/utils/constants.ts

@ -157,7 +157,8 @@ export class TemplatesSelectionPlugin extends ViewPlugin {
key={template.name}
title={template.name}
hScrollable={false}
>
header={template.source === 'plugin' ? <button className="btn border" onClick={() => { this.call('manager', 'activatePlugin', template.payload.pluginName) }}>Open Cookbook to load more contracts</button> : ''}
>
{template.items.map(item => {
return <RemixUIGridCell
plugin={this}

@ -258,6 +258,24 @@ export const templates = (intl) => {
}
]
},
{
name: "Cookbook",
source: "plugin",
payload: {
pluginName: 'cookbookdev'
},
items: [
{ value: "token-sale", displayName: 'Token Sale' },
{ value: "simple-nft-sale", displayName: 'Simple Nft Sale' },
{ value: "Azuki-ERC721A-NFT-Sale-basic", displayName: 'Azuki ERC721A NFT Sale basic' },
{ value: "Azuki-ERC721A-ERC721A", displayName: 'Azuki ERC721A' },
{ value: "token-staking-with-infinite-rewards", displayName: 'Token Staking with infinite rewards' },
{ value: "nft-staking-with-infinite-rewards", displayName: 'Nft Staking with infinite rewards' },
{ value: "basic-dao", displayName: 'Basic DAO' },
{ value: "soulbound-nft", displayName: 'Soulbound Nft' },
{ value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", displayName: 'Multi collection nft with burnable nfts and pausable transfers' },
]
},
{
name: "OxProject",
items: [

@ -63,6 +63,7 @@ export const RemixUIGridSection = (props: RemixUIGridSectionProps) => {
>
<div className="d-flex flex-column w-100 remixui_grid_section">
{ props.title && <h6 className='mt-1 mb-0 align-items-left '>{ props.title }</h6> }
<div className={(props.hScrollable) ? `d-flex flex-row pb-2 overflow-auto` : `d-flex flex-wrap`}>
{ !hasChildCell(children) && <span> No items found </span>}
{ props.children }

@ -34,6 +34,60 @@ export const TEMPLATE_METADATA: Record<string, TemplateType> = {
name: 'cookbookdev',
endpoint: 'openPattern',
params: ['Uniswap-V4-HookBook-MultiSigSwapHook', true]
},
'token-sale': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['token-sale']
},
'simple-nft-sale': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['simple-nft-sale']
},
'Azuki-ERC721A-NFT-Sale-basic': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['Azuki-ERC721A-NFT-Sale-basic']
},
'Azuki-ERC721A-ERC721A': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['Azuki-ERC721A-ERC721A']
},
'token-staking-with-infinite-rewards': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['token-staking-with-infinite-rewards']
},
'nft-staking-with-infinite-rewards': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['nft-staking-with-infinite-rewards']
},
'basic-dao': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['basic-dao']
},
'soulbound-nft': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['soulbound-nft']
},
'multi-collection-nft-with-burnable-nfts-and-pausable-transfers': {
type: 'plugin',
name: 'cookbookdev',
endpoint: 'openContract',
params: ['multi-collection-nft-with-burnable-nfts-and-pausable-transfers']
}
}

Loading…
Cancel
Save