Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
4b82b46
Refactor stablecoin to build based on erc20
ericglau Jan 29, 2025
78d9fce
Add ERC20Bridgeable to core
ericglau Jan 30, 2025
60f13d9
Add testcases WIP
ericglau Jan 30, 2025
daa322d
Use options error
ericglau Jan 31, 2025
c6fd584
Add to UI
ericglau Jan 31, 2025
cef1887
Fix access control handling WIP
ericglau Jan 31, 2025
8dc16b0
Use revert
ericglau Jan 31, 2025
c883dd9
Fix mutability, update snapshots
ericglau Jan 31, 2025
5094865
Fix access control check
ericglau Jan 31, 2025
4ebd872
Update tests
ericglau Jan 31, 2025
480e913
Test error condition
ericglau Jan 31, 2025
9e20d68
Disable Upgradeable when Bridgeable
ericglau Jan 31, 2025
040620f
Change superchain to checkbox
ericglau Jan 31, 2025
0dcbb1c
Refactor selection logic
ericglau Jan 31, 2025
a3ff402
Do not require access control
ericglau Jan 31, 2025
4153e8d
Add OP icon
ericglau Jan 31, 2025
f61c157
Fix grammar
ericglau Jan 31, 2025
ab5a9f0
Add experimental tag
ericglau Jan 31, 2025
62f612f
Move section, fix grammar
ericglau Jan 31, 2025
c693316
Update lockfile
ericglau Feb 3, 2025
dc645f1
Update workflow
ericglau Feb 3, 2025
24502ae
Update workflow
ericglau Feb 3, 2025
c48e4b7
Update netlify.toml
ericglau Feb 3, 2025
32ba778
Move husky to prepare
ericglau Feb 3, 2025
03b47a8
Move husky to devDependencies
ericglau Feb 3, 2025
08f8ccd
Revert workflow
ericglau Feb 3, 2025
b9d0efa
Update ui devDependencies
ericglau Feb 3, 2025
e49b4ca
Test use fork
ericglau Feb 3, 2025
f627cea
Simplify test matrix
ericglau Feb 3, 2025
93cadf7
Update lock
ericglau Feb 3, 2025
35acf7f
Use latest Community Contracts
ericglau Feb 3, 2025
6c83142
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Feb 5, 2025
bd5c2f0
Fix merge
ericglau Feb 5, 2025
74351a7
Change Bridgeable to use radio buttons
ericglau Feb 5, 2025
0f0b863
Fix ownable test
ericglau Feb 6, 2025
572a233
Update packages/core/solidity/src/erc20.ts
ericglau Feb 6, 2025
4ea0a22
Apply review comment, add type check
ericglau Feb 6, 2025
63b9274
Update wording
ericglau Feb 12, 2025
b8dc288
Add tooltip when SuperchainERC20 is enabled
ericglau Feb 12, 2025
389d610
Add link
ericglau Feb 12, 2025
c3937f3
Change grammar
ericglau Feb 12, 2025
5b12099
experimental, tooltip and disabled messages
makiopen Feb 13, 2025
aac0284
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Feb 13, 2025
65883f2
Update upgradeability message
ericglau Feb 13, 2025
33dca83
Defender deploy - enforce deterministic with reason
ericglau Feb 14, 2025
c078f1d
Rename property
ericglau Feb 14, 2025
101ba0a
Add OP Chains comment for SuperchainERC20
ericglau Feb 14, 2025
fdafaed
Fix svelte check
ericglau Feb 14, 2025
27bad1f
Update function comment
ericglau Feb 18, 2025
5ec8a55
Add to Stablecoin and RWA tabs
ericglau Feb 18, 2025
62d1240
Adjust experimental markers on Stablecoin and RWA UIs
ericglau Feb 18, 2025
5790893
Disable Remix/Download Foundry/Download Hardhat for Bridgeable
ericglau Feb 18, 2025
b0f3248
Rename bridgeable API option from true to custom
ericglau Feb 18, 2025
a135d76
Rename bridgeable option to crossChainBridging
ericglau Feb 19, 2025
4c12b08
Refactor addCrossChainBridging cases
ericglau Feb 19, 2025
baf93ac
Organize logic for button visibility
ericglau Feb 19, 2025
9b88206
Refactor superchain tooltip into common helper
ericglau Feb 19, 2025
0f7050d
Update popup and tooltip about OP Chains
ericglau Feb 20, 2025
3e8ad16
Update AI assistant
ericglau Feb 20, 2025
ffc7124
Update prompt
ericglau Feb 20, 2025
d35b4c5
Change OP Chains to chains in the Superchain
ericglau Feb 20, 2025
b0c7ef8
Check chainId on premint when bridgeable
ericglau Feb 25, 2025
e6fd6f4
Add premint input check
ericglau Feb 25, 2025
f554f23
Update tests
ericglau Feb 25, 2025
b5d87cb
Add tests, change premint and cross chain bridging implementation order
ericglau Feb 25, 2025
37cd777
Update changelog
ericglau Feb 25, 2025
db170e7
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Feb 25, 2025
457d102
Fix lint
ericglau Feb 25, 2025
3150588
Fix svelte-check
ericglau Feb 25, 2025
ffa6021
Update snapshots
ericglau Feb 25, 2025
cf6e0d5
Hide action buttons if error
ericglau Feb 26, 2025
d0b918a
Prevent code text selection if error
ericglau Feb 26, 2025
e5697ce
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Feb 26, 2025
dcc7d7d
Group by Superchain in network selection
ericglau Feb 27, 2025
c7e88cb
Extract if condition into variable
ericglau Feb 27, 2025
856f6e8
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Mar 5, 2025
d4f2dac
Add testcase for bridging ownable mintable
ericglau Mar 5, 2025
0f3cc82
Update testcase name
ericglau Mar 5, 2025
4f00687
Bump versions for publishing
ericglau Mar 13, 2025
bbf7320
Merge remote-tracking branch 'upstream/master' into erc20bridgeable
ericglau Mar 13, 2025
9fab82c
Update widths for other langs
ericglau Mar 13, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: matrix.package == 'solidity'
uses: foundry-rs/foundry-toolchain@v1
- name: Install dependencies
run: yarn install --network-concurrency 1
run: yarn install
- name: Compile TypeScript
run: yarn tsc
working-directory: packages/core/${{matrix.package}}
Expand Down
3 changes: 0 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ publish = "packages/ui/public"

edge_functions = "packages/ui/api"

[build.environment]
YARN_FLAGS = "--network-concurrency 1"

[[edge_functions]]
path = "/ai"
function = "ai"
10 changes: 9 additions & 1 deletion packages/core/solidity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.5.3 (2025-03-13)

- Add ERC20 Cross-Chain Bridging, SuperchainERC20. ([#436](https://github.com/OpenZeppelin/contracts-wizard/pull/436))
**Note:** Cross-Chain Bridging is experimental and may be subject to change.

- **Potentially breaking changes**:
- Change order of constructor argument `recipient` when using `premint`.

## 0.5.2 (2025-02-21)

- Fix modifiers order to follow Solidity style guides. ([#450](https://github.com/OpenZeppelin/contracts-wizard/pull/450))
Expand All @@ -8,7 +16,7 @@
## 0.5.1 (2025-02-05)

- **Potentially breaking changes**:
- Add constructor argument `recipient` when using `premint` in `erc20`, `stablecoin`, and `realWorldAsset`.
- Add constructor argument `recipient` when using `premint` in `erc20`, `stablecoin`, and `realWorldAsset`. ([#435](https://github.com/OpenZeppelin/contracts-wizard/pull/435))

## 0.5.0 (2025-01-23)

Expand Down
2 changes: 1 addition & 1 deletion packages/core/solidity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/wizard",
"version": "0.5.2",
"version": "0.5.3",
"description": "A boilerplate generator to get started with OpenZeppelin Contracts",
"license": "AGPL-3.0-only",
"repository": "https://github.com/OpenZeppelin/contracts-wizard",
Expand Down
121 changes: 121 additions & 0 deletions packages/core/solidity/src/erc20.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import test from 'ava';
import type { OptionsError } from '.';
import { erc20 } from '.';

import type { ERC20Options } from './erc20';
Expand Down Expand Up @@ -98,6 +99,126 @@ testERC20('erc20 flashmint', {
flashmint: true,
});

testERC20('erc20 crossChainBridging custom', {
crossChainBridging: 'custom',
});

testERC20('erc20 crossChainBridging custom ownable', {
crossChainBridging: 'custom',
access: 'ownable',
});

testERC20('erc20 crossChainBridging custom ownable mintable burnable', {
crossChainBridging: 'custom',
access: 'ownable',
mintable: true,
burnable: true,
});

testERC20('erc20 crossChainBridging custom roles', {
crossChainBridging: 'custom',
access: 'roles',
});

testERC20('erc20 crossChainBridging custom managed', {
crossChainBridging: 'custom',
access: 'managed',
});

testERC20('erc20 crossChainBridging superchain', {
crossChainBridging: 'superchain',
});

testERC20('erc20 crossChainBridging superchain ownable', {
crossChainBridging: 'superchain',
access: 'ownable',
});

testERC20('erc20 crossChainBridging superchain roles', {
crossChainBridging: 'superchain',
access: 'roles',
});

testERC20('erc20 crossChainBridging superchain managed', {
crossChainBridging: 'superchain',
access: 'managed',
});

test('erc20 crossChainBridging custom, upgradeable not allowed', async t => {
const error = t.throws(() =>
buildERC20({
name: 'MyToken',
symbol: 'MTK',
crossChainBridging: 'custom',
upgradeable: 'transparent',
}),
);
t.is(
(error as OptionsError).messages.crossChainBridging,
'Upgradeability is not currently supported with Cross-Chain Bridging',
);
});

test('erc20 crossChainBridging superchain, upgradeable not allowed', async t => {
const error = t.throws(() =>
buildERC20({
name: 'MyToken',
symbol: 'MTK',
crossChainBridging: 'superchain',
upgradeable: 'transparent',
}),
);
t.is(
(error as OptionsError).messages.crossChainBridging,
'Upgradeability is not currently supported with Cross-Chain Bridging',
);
});

test('erc20 crossChainBridging superchain, premintChainId required', async t => {
const error = t.throws(() =>
buildERC20({
name: 'MyToken',
symbol: 'MTK',
crossChainBridging: 'superchain',
premint: '2000',
}),
);
t.is(
(error as OptionsError).messages.premintChainId,
'Chain ID is required when using Premint with Cross-Chain Bridging',
);
});

testERC20('erc20 premint ignores chainId when not crossChainBridging', {
premint: '2000',
premintChainId: '10',
});

testERC20('erc20 premint chainId crossChainBridging custom', {
premint: '2000',
premintChainId: '10',
crossChainBridging: 'custom',
});

testERC20('erc20 premint chainId crossChainBridging superchain', {
premint: '2000',
premintChainId: '10',
crossChainBridging: 'superchain',
});

testERC20('erc20 full crossChainBridging custom non-upgradeable', {
premint: '2000',
access: 'roles',
burnable: true,
mintable: true,
pausable: true,
permit: true,
votes: true,
flashmint: true,
crossChainBridging: 'custom',
premintChainId: '10',
});

testERC20('erc20 full upgradeable transparent', {
premint: '2000',
access: 'roles',
Expand Down
Loading
Loading