Skip to content

Commit 09e7871

Browse files
authored
Merge pull request #28 from OpenZeppelin/main
Release to remix
2 parents a4d3c48 + e6ff053 commit 09e7871

35 files changed

+2102
-144
lines changed

README.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
<img src="./src/docs/banner.png" width="100%" alt="OpenZeppelin Logo">
33
</p>
44

5-
# Deploy with Defender - Remix Plugin
5+
# Defender Deploy Plugin
66

7-
Remix plugin to deploy smart contracts using OpenZeppelin Defender. For documentation about usage please visit the [Defender Docs](https://docs.openzeppelin.com/defender/remix-plugin).
7+
Plugin to deploy smart contracts using OpenZeppelin Defender. Currently supported in:
8+
9+
- [Remix IDE](https://remix.ethereum.org/) - As a plugin listed in plugins directory, for more information please visit [our docs](https://docs.openzeppelin.com/defender/remix-plugin).
10+
- [Contracts Wizard](https://wizard.openzeppelin.com/) - Integrated in code editor, for more information please visit [our docs](https://docs.openzeppelin.com/defender/remix-plugin).
811

912
## Getting Started
1013

@@ -16,7 +19,7 @@ pnpm install
1619
pnpm dev
1720
```
1821

19-
The interface is ugly, but don't worry! it's not meant to be used directly, it's used embedded in a Remix iframe instead, and adopts its styles.
22+
NOTE: This project is meant to be embedded in other UIs, just running the project won't be enough to see and debug it. You must embed the UI on an external iframe.
2023

2124
## Testing in Remix
2225

@@ -31,4 +34,38 @@ Url: http://localhost:5173 # or live version https://defeder-remix-deploy.netlif
3134
Type of connection: Iframe
3235
Location in Remix: Side Panel
3336
```
34-
5. You should see the plugin added to the sidebar (new icon with ? symbol).
37+
5. You should see the plugin added to the sidebar (new icon with ? symbol).
38+
39+
## Testing in Contracts Wizard
40+
41+
For testing in Contracts Wizard, you must also run the Contracts Wizard UI locally to point to your local plugin.
42+
43+
1. Run Contracts Wizard locally.
44+
- a. Go to [https://github.com/OpenZeppelin/contracts-wizard](Contracts Wizard Repo).
45+
- b. Clone the latest `master` branch and follow steps to setup the project.
46+
- c. Move to `pacakges/ui` and run it with `yarn dev`.
47+
2. In another terminal, run this project using `pnpm dev`, make sure the app is served in `http://localhost:5173`.
48+
3. Open Contracts Wizard local UI, generally in `http://localhost:8080`.
49+
4. Click on "Deploy with Defender" button, you should be able to see embedded the local plugin.
50+
51+
## Development
52+
53+
Many parts of codebase are shared across plugins (server side code, state definition, ethereum interactions, etc.), but UI components have a separated implementation to make them more flexible and prevent side-effects.
54+
55+
We have some bootstrap logic to expose one UI or another depending on the parent iframe domain.
56+
57+
### Remix
58+
The entrypoint for Remix plugin is `src/routes/remix.svelte`. Its components mainly use [bootstrap](https://getbootstrap.com/) for styling, Remix UI injects bootstrap dependency as a <link> html tag when embedded.
59+
60+
### Wizard
61+
The entrypoint for Contracts Wizard plugin is `src/routes/wizard.svelte`. Its components mainly use [tailwind CSS](https://tailwindcss.com/) for styling, this is mainly for convenience, since Contracts Wizard was made using this CSS framework.
62+
63+
## Release
64+
65+
The repo has a CI/CD connected to our netlify account, when we merge `main` to some of the release branches, a new version of the plugin is released to live. Branches:
66+
67+
- Remix IDE Plugin - `release-remix`
68+
- Contracts Wizard Plugin - `release-wizard`
69+
70+
> [!WARNING]
71+
> We use `main` branch as the single source of truth and it's the only branch allowed to be merged to release branches. It should be tested carefully before triggering a new release.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
"@sveltejs/adapter-auto": "^3.0.0",
1414
"@sveltejs/kit": "^2.0.0",
1515
"@sveltejs/vite-plugin-svelte": "^4.0.0",
16+
"autoprefixer": "^10.4.20",
17+
"postcss": "^8.4.49",
1618
"svelte": "^5.0.0",
1719
"svelte-check": "^4.0.0",
20+
"tailwindcss": "^3.4.16",
1821
"typescript": "^5.0.0",
1922
"vite": "^5.0.3"
2023
},
@@ -26,6 +29,7 @@
2629
"@remixproject/plugin-utils": "^0.3.38",
2730
"@sveltejs/adapter-netlify": "^4.3.6",
2831
"bootstrap": "^5.3.3",
29-
"ethers": "^6.13.4"
32+
"ethers": "^6.13.4",
33+
"solc": "^0.8.28"
3034
}
3135
}

0 commit comments

Comments
 (0)