Skip to content

Commit 3d34a00

Browse files
authored
Fix Cairo stable and alpha UI links (#701)
1 parent d5a10bc commit 3d34a00

22 files changed

+68
-62
lines changed

packages/ui/src/cairo/AccessControlSection.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333
bind:value={access}
3434
defaultValue="ownable"
3535
helpContent="Restrict who can access the functions of a contract or when they can do it."
36-
helpLink="https://docs.openzeppelin.com/contracts-cairo/access"
36+
helpLink="https://docs.openzeppelin.com/contracts-cairo/2.x/access"
3737
{required}
3838
>
3939
<div class="checkbox-group">
4040
<label class:checked={access === 'ownable'}>
4141
<input type="radio" bind:group={access} value="ownable" />
4242
Ownable
43-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/access#ownership_and_ownable">
43+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/access#ownership_and_ownable">
4444
Simple mechanism with a single account authorized for all privileged actions.
4545
</HelpTooltip>
4646
</label>
4747
<label class:checked={access === 'roles'}>
4848
<input type="radio" bind:group={access} value="roles" />
4949
Roles
50-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/access#role_based_accesscontrol">
50+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/access#role_based_accesscontrol">
5151
Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.
5252
</HelpTooltip>
5353
</label>

packages/ui/src/cairo/AccountControls.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
<label class:checked={accountType === 'stark'}>
3232
<input type="radio" bind:group={opts.type} value="stark" />
3333
Starknet
34-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/accounts#starknet_account">
34+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/accounts#starknet_account">
3535
Starknet account that uses the STARK curve for signature checking.
3636
</HelpTooltip>
3737
</label>
3838

3939
<label class:checked={accountType === 'eth'}>
4040
<input type="radio" bind:group={opts.type} value="eth" />
4141
Ethereum
42-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/accounts#ethereum_account">
42+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/accounts#ethereum_account">
4343
Ethereum-flavored account that uses the Secp256k1 curve for signature checking.
4444
</HelpTooltip>
4545
</label>
@@ -69,7 +69,7 @@
6969
<label class:checked={opts.deploy}>
7070
<input type="checkbox" bind:checked={opts.deploy} />
7171
Deployable
72-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/accounts#deploying_an_account">
72+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/accounts#deploying_an_account">
7373
Enables the account to be counterfactually deployed.
7474
</HelpTooltip>
7575
</label>

packages/ui/src/cairo/CustomControls.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<label class:checked={opts.pausable}>
3737
<input type="checkbox" bind:checked={opts.pausable} />
3838
Pausable
39-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/security#pausable">
39+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/security#pausable">
4040
Privileged accounts will be able to pause the functionality marked with <code
4141
>self.pausable.assert_not_paused()</code
4242
>. Useful for emergency response.

packages/ui/src/cairo/ERC1155Controls.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<label class:checked={opts.pausable}>
5757
<input type="checkbox" bind:checked={opts.pausable} />
5858
Pausable
59-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/security#pausable">
59+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/security#pausable">
6060
Privileged accounts will be able to pause the functionality marked with <code
6161
>self.pausable.assert_not_paused()</code
6262
>. Useful for emergency response.
@@ -65,7 +65,7 @@
6565
<label class:checked={opts.updatableUri}>
6666
<input type="checkbox" bind:checked={opts.updatableUri} />
6767
Updatable URI
68-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/api/erc1155#ERC1155Component-set_base_uri">
68+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/erc1155#ERC1155Component-set_base_uri">
6969
Privileged accounts will be able to set a new URI for all token types. Clients will replace any instance of {'{id}'}
7070
in the URI with the tokenId.
7171
</HelpTooltip>

packages/ui/src/cairo/ERC20Controls.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<label class:checked={opts.mintable}>
6262
<input type="checkbox" bind:checked={opts.mintable} />
6363
Mintable
64-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/erc20-supply">
64+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/erc20-supply">
6565
Privileged accounts will be able to create more supply.
6666
</HelpTooltip>
6767
</label>
@@ -75,7 +75,7 @@
7575
<label class:checked={opts.pausable}>
7676
<input type="checkbox" bind:checked={opts.pausable} />
7777
Pausable
78-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/security#pausable">
78+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/security#pausable">
7979
Privileged accounts will be able to pause the functionality marked with <code
8080
>self.pausable.assert_not_paused()</code
8181
>. Useful for emergency response.
@@ -90,13 +90,13 @@
9090
label="Votes"
9191
bind:checked={opts.votes}
9292
helpContent="Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."
93-
helpLink="https://docs.openzeppelin.com/contracts-cairo/governance/votes"
93+
helpLink="https://docs.openzeppelin.com/contracts-cairo/2.x/governance/votes"
9494
error={errors?.appName || errors?.appVersion}
9595
>
9696
<label class="labeled-input">
9797
<span class="flex justify-between pr-2">
9898
Application Name
99-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12">
99+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12">
100100
Name for domain separator. Prevents two applications from producing the same hash.
101101
</HelpTooltip>
102102
</span>
@@ -106,7 +106,7 @@
106106
<label class="labeled-input">
107107
<span class="flex justify-between pr-2">
108108
Application Version
109-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12">
109+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12">
110110
Version for domain separator. Prevents two versions of the same application from producing the same hash.
111111
</HelpTooltip>
112112
</span>

packages/ui/src/cairo/ERC721Controls.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<label class:checked={opts.mintable}>
5353
<input type="checkbox" bind:checked={opts.mintable} />
5454
Mintable
55-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/erc721">
55+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/erc721">
5656
Privileged accounts will be able to emit new tokens.
5757
</HelpTooltip>
5858
</label>
@@ -64,7 +64,7 @@
6464
<label class:checked={opts.pausable}>
6565
<input type="checkbox" bind:checked={opts.pausable} />
6666
Pausable
67-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/security#pausable">
67+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/security#pausable">
6868
Privileged accounts will be able to pause the functionality marked with <code
6969
>self.pausable.assert_not_paused()</code
7070
>. Useful for emergency response.
@@ -73,7 +73,7 @@
7373
<label class:checked={opts.enumerable}>
7474
<input type="checkbox" bind:checked={opts.enumerable} />
7575
Enumerable
76-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/api/erc721#ERC721EnumerableComponent">
76+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/erc721#ERC721EnumerableComponent">
7777
Allows a contract to publish its entire list of NFTs and make them discoverable by keeping track of all token
7878
ids and all tokens owned by an address.
7979
</HelpTooltip>
@@ -86,13 +86,13 @@
8686
label="Votes"
8787
bind:checked={opts.votes}
8888
helpContent="Keeps track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."
89-
helpLink="https://docs.openzeppelin.com/contracts-cairo/governance/votes"
89+
helpLink="https://docs.openzeppelin.com/contracts-cairo/2.x/governance/votes"
9090
error={errors?.appName || errors?.appVersion}
9191
>
9292
<label class="labeled-input">
9393
<span class="flex justify-between pr-2">
9494
Application Name
95-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12">
95+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12">
9696
Name for domain separator. Prevents two applications from producing the same hash.
9797
</HelpTooltip>
9898
</span>
@@ -102,7 +102,7 @@
102102
<label class="labeled-input">
103103
<span class="flex justify-between pr-2">
104104
Application Version
105-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12">
105+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12">
106106
Version for domain separator. Prevents two versions of the same application from producing the same hash.
107107
</HelpTooltip>
108108
</span>

packages/ui/src/cairo/GovernorControls.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@
154154
<label class:checked={opts.votes === 'erc20votes'}>
155155
<input type="radio" bind:group={opts.votes} value="erc20votes" />
156156
ERC20Votes
157-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/api/governance#VotesComponent">
157+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/governance#VotesComponent">
158158
Represent voting power with a votes-enabled ERC20 token. Voters can entrust their voting power to a delegate.
159159
</HelpTooltip>
160160
</label>
161161

162162
<label class:checked={opts.votes === 'erc721votes'}>
163163
<input type="radio" bind:group={opts.votes} value="erc721votes" />
164164
ERC721Votes
165-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/api/governance#VotesComponent">
165+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/governance#VotesComponent">
166166
Represent voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.
167167
</HelpTooltip>
168168
</label>
@@ -201,7 +201,7 @@
201201
<label class:checked={opts.timelock === 'openzeppelin'}>
202202
<input type="radio" bind:group={opts.timelock} value="openzeppelin" />
203203
TimelockController
204-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/api/governance#TimelockControllerComponent">
204+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/governance#TimelockControllerComponent">
205205
Module compatible with OpenZeppelin's <code>TimelockController</code>.
206206
</HelpTooltip>
207207
</label>
@@ -220,7 +220,7 @@
220220
<label class="labeled-input">
221221
<span class="flex justify-between pr-2">
222222
Application Name
223-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12"
223+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12"
224224
>Name for domain separator. Prevents two applications from producing the same hash.</HelpTooltip
225225
>
226226
</span>
@@ -230,7 +230,7 @@
230230
<label class="labeled-input">
231231
<span class="flex justify-between pr-2">
232232
Application Version
233-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/guides/snip12"
233+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/guides/snip12"
234234
>Version for domain separator. Prevents two versions of the same application from producing the same hash.</HelpTooltip
235235
>
236236
</span>

packages/ui/src/cairo/MultisigControls.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<label class="labeled-input">
3131
<span class="flex justify-between pr-2">
3232
Quorum
33-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/governance/multisig#signer_management">
33+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/governance/multisig#signer_management">
3434
The minimal number of confirmations required to approve a transaction.
3535
</HelpTooltip>
3636
</span>

packages/ui/src/cairo/RoyaltyInfoSection.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
label="Royalty Info"
1414
bind:checked={opts.enabled}
1515
helpContent="Provides information for how much royalty is owed and to whom, based on a sale price. Follows ERC-2981 standard."
16-
helpLink="https://docs.openzeppelin.com/contracts-cairo/api/token_common#ERC2981Component"
16+
helpLink="https://docs.openzeppelin.com/contracts-cairo/2.x/api/token_common#ERC2981Component"
1717
error={errors?.defaultRoyaltyFraction || errors?.feeDenominator}
1818
>
1919
<label class="labeled-input">
@@ -35,7 +35,7 @@
3535
<span class="flex justify-between pr-2">
3636
Fee Denominator
3737
<HelpTooltip
38-
link="https://docs.openzeppelin.com/contracts-cairo/api/token_common#ERC2981Component-IC-FEE_DENOMINATOR"
38+
link="https://docs.openzeppelin.com/contracts-cairo/2.x/api/token_common#ERC2981Component-IC-FEE_DENOMINATOR"
3939
>
4040
The denominator used to interpret a token's fee and to calculate the result fee fraction.
4141
</HelpTooltip>

packages/ui/src/cairo/UpgradeabilityField.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<label class:checked={upgradeable}>
1010
<input type="checkbox" bind:checked={upgradeable} />
1111
Upgradeable
12-
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/upgrades">
12+
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/2.x/upgrades">
1313
Smart contracts are immutable by default unless they include code that allows them to be upgraded.
1414
</HelpTooltip>
1515
</label>

0 commit comments

Comments
 (0)