From b4e2f862c904382c4ce2c55d4e8913e8b6519752 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 2 Sep 2024 15:24:02 +0200 Subject: [PATCH 1/7] add partner plugin --- apps/remix-ide/src/remixAppManager.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index f8230695857..dc370bd5d52 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -93,6 +93,8 @@ const dependentModules = ['foundry', 'hardhat', 'truffle', 'slither'] const loadLocalPlugins = ['doc-gen', 'doc-viewer', 'etherscan', 'vyper', 'solhint', 'walletconnect', 'circuit-compiler', 'learneth', 'quick-dapp'] +const partnerPlugins = ['cookbookdev'] + const sensitiveCalls = { fileManager: ['writeFile', 'copyFile', 'rename', 'copyDir'], contentImport: ['resolveAndSave'], @@ -206,6 +208,11 @@ export class RemixAppManager extends PluginManager { return true } + // skipping partner plugins' requests + if (partnerPlugins[from]) { + return true + } + // ask the user for permission return await this.call('permissionhandler', 'askPermission', this.profiles[from], this.profiles[to], method, message, isSensitiveCall) } From 998d995e4f2c066d7c0f5438a38b06aa69efcb41 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 2 Sep 2024 17:29:36 +0200 Subject: [PATCH 2/7] add more template --- .../workspace/src/lib/utils/constants.ts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libs/remix-ui/workspace/src/lib/utils/constants.ts b/libs/remix-ui/workspace/src/lib/utils/constants.ts index f0d150afb16..1d28b8d40a0 100644 --- a/libs/remix-ui/workspace/src/lib/utils/constants.ts +++ b/libs/remix-ui/workspace/src/lib/utils/constants.ts @@ -88,6 +88,36 @@ export const TEMPLATE_METADATA: Record = { name: 'cookbookdev', endpoint: 'openContract', params: ['multi-collection-nft-with-burnable-nfts-and-pausable-transfers'] + }, + 'OpenSea-Seaport': { + type: 'plugin', + name: 'cookbookdev', + endpoint: 'openProtocol', + params: ['OpenSea-Seaport'] + }, + 'Ethereum-Name-Service': { + type: 'plugin', + name: 'cookbookdev', + endpoint: 'openProtocol', + params: ['Ethereum-Name-Service'] + }, + 'Umbra-Cash': { + type: 'plugin', + name: 'cookbookdev', + endpoint: 'openProtocol', + params: ['Umbra-Cash'] + }, + 'Aave-V3': { + type: 'plugin', + name: 'cookbookdev', + endpoint: 'openProtocol', + params: ['Aave-V3'] + }, + 'ChainLink': { + type: 'plugin', + name: 'cookbookdev', + endpoint: 'openProtocol', + params: ['ChainLink'] } } From 47cd97949964869e263b29e366eb2426b16ed344 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 3 Sep 2024 10:15:18 +0200 Subject: [PATCH 3/7] update action in grid section --- apps/remix-ide/src/app/plugins/templates-selection/templates.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 5bde8d57efd..0d3fe23b0d0 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -264,7 +264,6 @@ export const templates = (intl, plugin) => { await plugin.call('manager', 'activatePlugin', 'cookbookdev') plugin.call('menuicons', 'showContent', 'cookbookdev') }, - onClickLabel: 'Open Cookbook Plugin', description: 'Discover more templates!', items: [ { value: "token-sale", displayName: 'Token Sale' }, From 61f78314b1f78ba5736addb666ab14ce0eace471 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 3 Sep 2024 11:31:40 +0200 Subject: [PATCH 4/7] update css label --- .../templates-selection/templates-selection-plugin.css | 9 ++++++++- .../templates-selection/templates-selection-plugin.tsx | 4 ++-- .../src/app/plugins/templates-selection/templates.ts | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css index f6e9f504f1c..c01c4027fd9 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css @@ -1,5 +1,12 @@ .TSCellStyle { - min-height: 8.5rem; + min-height: 9rem; + max-width: 13rem; + min-width: 13rem; + max-height: 8.5rem; +} + +.TSCellStyleShort { + min-height: 5rem; max-width: 13rem; min-width: 13rem; max-height: 8.5rem; diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx index 7ff0e5559f1..86ee7b38ad7 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx @@ -167,14 +167,14 @@ export class TemplatesSelectionPlugin extends ViewPlugin { id={item.name} searchKeywords={[item.displayName, item.description, template.name]} tagList={item.tagList} - classList='TSCellStyle' + classList={'TSCellStyle' + (!item.description ? 'Short' : '')} >
{item.description && {item.description}}
-
+
{(item.opts && item.opts.upgradeable && item.opts.upgradeable === 'uupds') && Upgradeable-UUPS} {(item.opts && item.opts.mintable) && mintable} {(item.opts && item.opts.burnable) && burnable} diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 0d3fe23b0d0..5bde8d57efd 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -264,6 +264,7 @@ export const templates = (intl, plugin) => { await plugin.call('manager', 'activatePlugin', 'cookbookdev') plugin.call('menuicons', 'showContent', 'cookbookdev') }, + onClickLabel: 'Open Cookbook Plugin', description: 'Discover more templates!', items: [ { value: "token-sale", displayName: 'Token Sale' }, From 3845ffdd4a9db267f8e0c8118da72f058a386ca3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 16 Sep 2024 14:55:07 +0200 Subject: [PATCH 5/7] rollback using short cell --- .../templates-selection/templates-selection-plugin.css | 9 +-------- .../templates-selection/templates-selection-plugin.tsx | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css index c01c4027fd9..f6e9f504f1c 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.css @@ -1,12 +1,5 @@ .TSCellStyle { - min-height: 9rem; - max-width: 13rem; - min-width: 13rem; - max-height: 8.5rem; -} - -.TSCellStyleShort { - min-height: 5rem; + min-height: 8.5rem; max-width: 13rem; min-width: 13rem; max-height: 8.5rem; diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx index 86ee7b38ad7..943021b3ae9 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx @@ -167,7 +167,7 @@ export class TemplatesSelectionPlugin extends ViewPlugin { id={item.name} searchKeywords={[item.displayName, item.description, template.name]} tagList={item.tagList} - classList={'TSCellStyle' + (!item.description ? 'Short' : '')} + classList={'TSCellStyle'} >
From 24892aa308521c2135c183fc540712c58252ac6f Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 16 Sep 2024 18:56:31 +0530 Subject: [PATCH 6/7] added cookbook templates desc --- .../plugins/templates-selection/templates.ts | 57 +++++++++++++++---- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index 5bde8d57efd..a92b952bd92 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -267,17 +267,52 @@ export const templates = (intl, plugin) => { onClickLabel: 'Open Cookbook Plugin', description: 'Discover more templates!', 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', description: "Multi collection NFT with:", opts: { - burnable: true, - pausable: true + { + value: "token-sale", + displayName: 'Token Sale', + description: "ERC20 token sale contact. Sell tokens for ETH" + }, + { + value: "simple-nft-sale", + displayName: 'Simple Nft Sale', + description: "ERC721 NFT with an adjustable price & to mint free NFTs" + }, + { + value: "Azuki-ERC721A-NFT-Sale-basic", + displayName: 'Azuki ERC721A NFT Sale basic', + description: "An implementation of the ERC721A standard" + }, + { + value: "Azuki-ERC721A-NFT-Sale", + displayName: 'Azuki ERC721A NFT Sale', + description: "An extension of the ERC721A standard with wallet limit" + }, + { + value: "token-staking-with-infinite-rewards", + displayName: 'Token Staking with infinite rewards', + description: "Token staking contract to reward ERC20 tokens for every token staked" + }, + { + value: "nft-staking-with-infinite-rewards", + displayName: 'NFT Staking with infinite rewards', + description: "NFT staking contract to reward exact number of ERC20 tokens per day" + }, + { + value: "basic-dao", + displayName: 'Basic DAO', + description: "A very simple implementation of a DAO" + }, + { + value: "soulbound-nft", + displayName: 'Soulbound NFT', + description: "ERC721 Soulbound NFT with no transfer capability" + }, + { value: "multi-collection-nft-with-burnable-nfts-and-pausable-transfers", + displayName: 'Multi collection NFT', + description: "Multi collection NFT with:", + opts: { + burnable: true, + pausable: true }, }, ] }, From 6dc4c2002b59a20f3b187a81f8fb48f5e3b7e524 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 16 Sep 2024 19:03:30 +0530 Subject: [PATCH 7/7] linting fix --- .../plugins/templates-selection/templates.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts index a92b952bd92..2a6ae5fc15d 100644 --- a/apps/remix-ide/src/app/plugins/templates-selection/templates.ts +++ b/apps/remix-ide/src/app/plugins/templates-selection/templates.ts @@ -267,42 +267,42 @@ export const templates = (intl, plugin) => { onClickLabel: 'Open Cookbook Plugin', description: 'Discover more templates!', items: [ - { + { value: "token-sale", displayName: 'Token Sale', description: "ERC20 token sale contact. Sell tokens for ETH" }, - { + { value: "simple-nft-sale", displayName: 'Simple Nft Sale', - description: "ERC721 NFT with an adjustable price & to mint free NFTs" + description: "ERC721 NFT with an adjustable price & to mint free NFTs" }, - { + { value: "Azuki-ERC721A-NFT-Sale-basic", displayName: 'Azuki ERC721A NFT Sale basic', description: "An implementation of the ERC721A standard" }, - { + { value: "Azuki-ERC721A-NFT-Sale", displayName: 'Azuki ERC721A NFT Sale', description: "An extension of the ERC721A standard with wallet limit" }, - { + { value: "token-staking-with-infinite-rewards", displayName: 'Token Staking with infinite rewards', description: "Token staking contract to reward ERC20 tokens for every token staked" }, - { + { value: "nft-staking-with-infinite-rewards", displayName: 'NFT Staking with infinite rewards', - description: "NFT staking contract to reward exact number of ERC20 tokens per day" + description: "NFT staking contract to reward exact number of ERC20 tokens per day" }, - { + { value: "basic-dao", displayName: 'Basic DAO', description: "A very simple implementation of a DAO" }, - { + { value: "soulbound-nft", displayName: 'Soulbound NFT', description: "ERC721 Soulbound NFT with no transfer capability" @@ -313,7 +313,7 @@ export const templates = (intl, plugin) => { opts: { burnable: true, pausable: true - }, }, + }, }, ] }, {