Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
84b7810
add conditional mount
MCarlomagno Nov 29, 2024
96e76d9
split wizard from remix UI
MCarlomagno Dec 2, 2024
e87118a
fix: merge conflicts with main
MCarlomagno Dec 3, 2024
c79fc0c
feat: install compiler and setup
MCarlomagno Dec 3, 2024
a253e8e
Merge branch 'main' into add-compiler-to-wizard-plugin
MCarlomagno Dec 3, 2024
39bceb8
feat: add support to solidity compiler
MCarlomagno Dec 3, 2024
ecd01cc
fmt
MCarlomagno Dec 3, 2024
9ce364f
fmt
MCarlomagno Dec 3, 2024
847d7e9
feat: listen to wizard changes
MCarlomagno Dec 3, 2024
e011e95
Merge pull request #11 from OpenZeppelin/add-compiler-to-wizard-plugin
MCarlomagno Dec 4, 2024
1505a17
change contract sources interface
MCarlomagno Dec 4, 2024
b9c0ca1
fix: merge conflicts with main
MCarlomagno Dec 4, 2024
492c670
fix: load contract to compile
MCarlomagno Dec 4, 2024
fb6ffbe
Merge pull request #12 from OpenZeppelin/listen-to-wizard-contracts
MCarlomagno Dec 4, 2024
0308303
add support to tailwind + add initial styles
MCarlomagno Dec 4, 2024
09ae740
authenticate + add support to global state
MCarlomagno Dec 4, 2024
0784465
feat: add more UI components
MCarlomagno Dec 4, 2024
bbaf2a8
extract contract name from sources
MCarlomagno Dec 6, 2024
e3ecae1
update readme
MCarlomagno Dec 6, 2024
24211f8
extract some components + add deploy button at the top level component
MCarlomagno Dec 6, 2024
45a05b2
reduce elements size
MCarlomagno Dec 6, 2024
499d601
Merge pull request #14 from OpenZeppelin/add-ui-components
MCarlomagno Dec 6, 2024
7918160
minor ui fixes + logic for compiling contracts
MCarlomagno Dec 6, 2024
eff7e92
implement deploy with existing approval process
MCarlomagno Dec 9, 2024
b7dd07e
add deployment logic
MCarlomagno Dec 9, 2024
beea07e
styling change for headers
makiopen Dec 10, 2024
e3cc1fe
Merge pull request #17 from OpenZeppelin/plat-5710-wizard-deploy-add-…
MCarlomagno Dec 10, 2024
b84125f
add view deployment button + improve messages
MCarlomagno Dec 10, 2024
ff851de
basic authenticate validation plus styling changes
makiopen Dec 10, 2024
f3dadca
add constructor inputs
MCarlomagno Dec 10, 2024
0adbba5
add support to deterministic deployments
MCarlomagno Dec 10, 2024
74e34e0
enforce deterministic when using multisig
MCarlomagno Dec 10, 2024
4a9b757
add warnings about upgradability + improve UX
MCarlomagno Dec 10, 2024
7906618
Merge pull request #19 from OpenZeppelin/minor-ui-improvements
MCarlomagno Dec 11, 2024
7dc0e64
Merge branch 'main' into plat-5710-wizard-deploy-add-deployment-funct…
makiopen Dec 11, 2024
8c938a8
style fixes for parameters
makiopen Dec 11, 2024
576a33b
Merge pull request #22 from OpenZeppelin/plat-5710-wizard-deploy-add-…
MCarlomagno Dec 11, 2024
05573a7
update readme
MCarlomagno Dec 11, 2024
27780bf
fix list sub items
MCarlomagno Dec 11, 2024
854b8a0
Update README.md
MCarlomagno Dec 12, 2024
4547cd6
Merge pull request #24 from OpenZeppelin/plat-5712-wizard-deploy-add-…
MCarlomagno Dec 12, 2024
01535fb
fix prevent adding salt when deterministic is un checked
MCarlomagno Dec 12, 2024
d43665f
react to all types of assets and contract name changed
MCarlomagno Dec 12, 2024
d150007
fmt
MCarlomagno Dec 12, 2024
6325203
Merge pull request #27 from OpenZeppelin/plat-5814-wizard-deploy-cons…
MCarlomagno Dec 12, 2024
d87d55b
Merge pull request #26 from OpenZeppelin/plat-5807-deploy-plugins-pre…
MCarlomagno Dec 12, 2024
e6ff053
fix style in remix plugin
MCarlomagno Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<img src="./src/docs/banner.png" width="100%" alt="OpenZeppelin Logo">
</p>

# Deploy with Defender - Remix Plugin
# Defender Deploy Plugin

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).
Plugin to deploy smart contracts using OpenZeppelin Defender. Currently supported in:

- [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).
- [Contracts Wizard](https://wizard.openzeppelin.com/) - Integrated in code editor, for more information please visit [our docs](https://docs.openzeppelin.com/defender/remix-plugin).

## Getting Started

Expand All @@ -16,7 +19,7 @@ pnpm install
pnpm dev
```

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.
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.

## Testing in Remix

Expand All @@ -31,4 +34,38 @@ Url: http://localhost:5173 # or live version https://defeder-remix-deploy.netlif
Type of connection: Iframe
Location in Remix: Side Panel
```
5. You should see the plugin added to the sidebar (new icon with ? symbol).
5. You should see the plugin added to the sidebar (new icon with ? symbol).

## Testing in Contracts Wizard

For testing in Contracts Wizard, you must also run the Contracts Wizard UI locally to point to your local plugin.

1. Run Contracts Wizard locally.
- a. Go to [https://github.com/OpenZeppelin/contracts-wizard](Contracts Wizard Repo).
- b. Clone the latest `master` branch and follow steps to setup the project.
- c. Move to `pacakges/ui` and run it with `yarn dev`.
2. In another terminal, run this project using `pnpm dev`, make sure the app is served in `http://localhost:5173`.
3. Open Contracts Wizard local UI, generally in `http://localhost:8080`.
4. Click on "Deploy with Defender" button, you should be able to see embedded the local plugin.

## Development

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.

We have some bootstrap logic to expose one UI or another depending on the parent iframe domain.

### Remix
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.

### Wizard
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.

## Release

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:

- Remix IDE Plugin - `release-remix`
- Contracts Wizard Plugin - `release-wizard`

> [!WARNING]
> 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.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.16",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
Expand All @@ -26,6 +29,7 @@
"@remixproject/plugin-utils": "^0.3.38",
"@sveltejs/adapter-netlify": "^4.3.6",
"bootstrap": "^5.3.3",
"ethers": "^6.13.4"
"ethers": "^6.13.4",
"solc": "^0.8.28"
}
}
Loading
Loading