Skip to content

Commit d5a10bc

Browse files
authored
Fix Solidity tooltip links to use versioned docs URL (#702)
1 parent 8073313 commit d5a10bc

10 files changed

+59
-59
lines changed

packages/ui/src/solidity/AccessControlSection.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,28 @@
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/api/access"
36+
helpLink="https://docs.openzeppelin.com/contracts/5.x/api/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/api/access#Ownable">
43+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/access#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/api/access#AccessControl">
50+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/access#AccessControl">
5151
Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts.
5252
</HelpTooltip>
5353
</label>
5454
<label class:checked={access === 'managed'}>
5555
<input type="radio" bind:group={access} value="managed" />
5656
Managed
57-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/access#AccessManaged">
57+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/access#AccessManaged">
5858
Enables a central contract to define a policy that allows certain callers to access certain functions.
5959
</HelpTooltip>
6060
</label>

packages/ui/src/solidity/AccountControls.svelte

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}}
6262
/>
6363
Signature Validation
64-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/accounts#signature_validation">
64+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/accounts#signature_validation">
6565
Enables smart contracts to validate signatures through a standard <code>isValidSignature</code> method. Unlike EOAs
6666
(regular accounts) that use private keys, this allows contracts to implement custom signature validation logic, making
6767
them capable of acting as signing entities for operations like approvals, swaps, or any signed messages.
@@ -77,7 +77,7 @@
7777
}}
7878
/>
7979
Account Bound
80-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/accounts#erc_7739_signatures">
80+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/accounts#erc_7739_signatures">
8181
Enhances signature security by using a defensive rehashing scheme that prevents signature replay attacks across
8282
multiple smart accounts owned by the same private key. This preserves the readability of signed contents while
8383
ensuring each signature is uniquely bound to a specific account and chain.
@@ -92,7 +92,7 @@
9292
}}
9393
/>
9494
ERC721 Holder
95-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721Holder">
95+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721Holder">
9696
Implement native support for receiving ERC-721 tokens.
9797
</HelpTooltip>
9898
</label>
@@ -105,7 +105,7 @@
105105
}}
106106
/>
107107
ERC1155 Holder
108-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc1155#ERC1155Holder">
108+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc1155#ERC1155Holder">
109109
Implement native support for receiving ERC-1155 tokens.
110110
</HelpTooltip>
111111
</label>
@@ -119,7 +119,7 @@
119119
}}
120120
/>
121121
Batched Execution
122-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/accounts#batched_execution">
122+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/accounts#batched_execution">
123123
Enables atomic execution of multiple transactions in a single operation, reducing total transaction costs and
124124
latency.
125125
</HelpTooltip>
@@ -164,29 +164,29 @@
164164
bind:value={opts.signer}
165165
defaultValue="ECDSA"
166166
helpContent="Defines the base signature validation mechanism for the account. This implementation will be used to validate user operations following ERC-4337 or by ERC-1271's <code>isValidSignature</code> to verify signatures on behalf of the account."
167-
helpLink="https://docs.openzeppelin.com/contracts/accounts#selecting_a_signer"
167+
helpLink="https://docs.openzeppelin.com/contracts/5.x/accounts#selecting_a_signer"
168168
>
169169
<div class="checkbox-group">
170170
<label class:checked={opts.signer === 'ECDSA'}>
171171
<input type="radio" bind:group={opts.signer} value="ECDSA" />
172172
ECDSA
173-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils/cryptography#ECDSA">
173+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils/cryptography#ECDSA">
174174
Standard Ethereum signature validation using secp256k1. Validates signatures against a specified owner address,
175175
making it suitable for accounts controlled by EOAs.
176176
</HelpTooltip>
177177
</label>
178178
<label class:checked={opts.signer === 'ERC7702'}>
179179
<input type="radio" bind:group={opts.signer} value="ERC7702" use:error={errors?.erc7702} />
180180
EOA Delegation
181-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/eoa-delegation">
181+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/eoa-delegation">
182182
Special ECDSA validation that uses the account's own address as the signer. Enables EOAs to delegate execution
183183
rights to the account while maintaining their native signature verification.
184184
</HelpTooltip>
185185
</label>
186186
<label class:checked={opts.signer === 'Multisig'}>
187187
<input type="radio" bind:group={opts.signer} value="Multisig" />
188188
Multisig
189-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/multisig">
189+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/multisig">
190190
ERC-7913 multisignature validation requiring a minimum number of signatures to approve operations. The contract
191191
maintains a set of authorized signers and validates that the number of valid signatures meets the threshold
192192
requirement.
@@ -195,23 +195,23 @@
195195
<label class:checked={opts.signer === 'MultisigWeighted'}>
196196
<input type="radio" bind:group={opts.signer} value="MultisigWeighted" />
197197
Multisig Weighted
198-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/multisig#multisignererc7913weighted">
198+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/multisig#multisignererc7913weighted">
199199
Weighted version of ERC-7913 multisignature validation. Signers have different voting weights, allowing for
200200
flexible governance. The total weight of valid signatures must meet the threshold requirement.
201201
</HelpTooltip>
202202
</label>
203203
<label class:checked={opts.signer === 'P256'}>
204204
<input type="radio" bind:group={opts.signer} value="P256" />
205205
P256
206-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils/cryptography#P256">
206+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils/cryptography#P256">
207207
Signature validation using the NIST P-256 curve (secp256r1). Useful for integrating with external systems and
208208
hardware that use this standardized curve, such as Apple's Passkeys or certain HSMs.
209209
</HelpTooltip>
210210
</label>
211211
<label class:checked={opts.signer === 'RSA'}>
212212
<input type="radio" bind:group={opts.signer} value="RSA" />
213213
RSA
214-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils/cryptography#RSA">
214+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils/cryptography#RSA">
215215
RSA PKCS#1 v1.5 signature validation following RFC8017. Enables integration with traditional PKI systems and
216216
hardware security modules that use RSA keys.
217217
</HelpTooltip>

packages/ui/src/solidity/CustomControls.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<label class:checked={opts.pausable}>
3434
<input type="checkbox" bind:checked={opts.pausable} />
3535
Pausable
36-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils#Pausable">
36+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable">
3737
Privileged accounts will be able to pause the functionality marked as <code>whenNotPaused</code>. Useful for
3838
emergency response.
3939
</HelpTooltip>

packages/ui/src/solidity/ERC1155Controls.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<label class:checked={opts.burnable}>
4848
<input type="checkbox" bind:checked={opts.burnable} />
4949
Burnable
50-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc1155#ERC1155Burnable">
50+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc1155#ERC1155Burnable">
5151
Token holders will be able to destroy their tokens.
5252
</HelpTooltip>
5353
</label>
@@ -59,15 +59,15 @@
5959
<label class:checked={opts.pausable}>
6060
<input type="checkbox" bind:checked={opts.pausable} />
6161
Pausable
62-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils#Pausable">
62+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable">
6363
Privileged accounts will be able to pause the functionality marked as <code>whenNotPaused</code>. Useful for
6464
emergency response.
6565
</HelpTooltip>
6666
</label>
6767
<label class:checked={opts.updatableUri}>
6868
<input type="checkbox" bind:checked={opts.updatableUri} />
6969
Updatable URI
70-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc1155#ERC1155-_setURI-string-">
70+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc1155#ERC1155-_setURI-string-">
7171
Privileged accounts will be able to set a new URI for all token types. Clients will replace any instance of {'{id}'}
7272
in the URI with the tokenId.
7373
</HelpTooltip>

packages/ui/src/solidity/ERC20Controls.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@
107107
<label class:checked={opts.burnable}>
108108
<input type="checkbox" bind:checked={opts.burnable} />
109109
Burnable
110-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Burnable">
110+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20Burnable">
111111
Token holders will be able to destroy their tokens.
112112
</HelpTooltip>
113113
</label>
114114

115115
<label class:checked={opts.pausable}>
116116
<input type="checkbox" bind:checked={opts.pausable} />
117117
Pausable
118-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils#Pausable">
118+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable">
119119
Privileged accounts will be able to pause the functionality marked as <code>whenNotPaused</code>. Useful for
120120
emergency response.
121121
</HelpTooltip>
@@ -132,15 +132,15 @@
132132
<label class:checked={opts.permit || opts.votes}>
133133
<input type="checkbox" bind:checked={opts.permit} />
134134
Permit
135-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Permit">
135+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20Permit">
136136
Without paying gas, token holders will be able to allow third parties to transfer from their account.
137137
</HelpTooltip>
138138
</label>
139139

140140
<label class:checked={opts.flashmint}>
141141
<input type="checkbox" bind:checked={opts.flashmint} />
142142
Flash Minting
143-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20FlashMint">
143+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20FlashMint">
144144
Built-in flash loans. Lend tokens without requiring collateral as long as they're returned in the same
145145
transaction.
146146
</HelpTooltip>
@@ -153,20 +153,20 @@
153153
bind:value={opts.votes}
154154
defaultValue="blocknumber"
155155
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."
156-
helpLink="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Votes"
156+
helpLink="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20Votes"
157157
>
158158
<div class="checkbox-group">
159159
<label class:checked={opts.votes === 'blocknumber'}>
160160
<input type="radio" bind:group={opts.votes} value="blocknumber" />
161161
Block Number
162-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#governor">
162+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#governor">
163163
Uses voting durations expressed as block numbers.
164164
</HelpTooltip>
165165
</label>
166166
<label class:checked={opts.votes === 'timestamp'}>
167167
<input type="radio" bind:group={opts.votes} value="timestamp" />
168168
Timestamp
169-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#timestamp_based_governance">
169+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#timestamp_based_governance">
170170
Uses voting durations expressed as timestamps.
171171
</HelpTooltip>
172172
</label>
@@ -178,7 +178,7 @@
178178
bind:value={opts.crossChainBridging}
179179
defaultValue="custom"
180180
helpContent="Allows authorized bridge contracts to mint and burn tokens for cross-chain transfers."
181-
helpLink="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Bridgeable"
181+
helpLink="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20Bridgeable"
182182
>
183183
<div class="checkbox-group">
184184
<label class:checked={opts.crossChainBridging === 'custom'}>

packages/ui/src/solidity/ERC721Controls.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,29 +73,29 @@
7373
<label class:checked={opts.burnable}>
7474
<input type="checkbox" bind:checked={opts.burnable} />
7575
Burnable
76-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721Burnable">
76+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721Burnable">
7777
Token holders will be able to destroy their tokens.
7878
</HelpTooltip>
7979
</label>
8080
<label class:checked={opts.pausable}>
8181
<input type="checkbox" bind:checked={opts.pausable} />
8282
Pausable
83-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/utils#Pausable">
83+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/utils#Pausable">
8484
Privileged accounts will be able to pause the functionality marked as <code>whenNotPaused</code>. Useful for
8585
emergency response.
8686
</HelpTooltip>
8787
</label>
8888
<label class:checked={opts.enumerable}>
8989
<input type="checkbox" bind:checked={opts.enumerable} />
9090
Enumerable
91-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721Enumerable">
91+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721Enumerable">
9292
Allows on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.
9393
</HelpTooltip>
9494
</label>
9595
<label class:checked={opts.uriStorage}>
9696
<input type="checkbox" bind:checked={opts.uriStorage} />
9797
URI Storage
98-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721URIStorage">
98+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721URIStorage">
9999
Allows updating token URIs for individual token IDs.
100100
</HelpTooltip>
101101
</label>
@@ -107,20 +107,20 @@
107107
bind:value={opts.votes}
108108
defaultValue="blocknumber"
109109
helpContent="Keeps track of individual units for voting in on-chain governance, with a way to delegate one's voting power to a trusted account."
110-
helpLink="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721Votes"
110+
helpLink="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721Votes"
111111
>
112112
<div class="checkbox-group">
113113
<label class:checked={opts.votes === 'blocknumber'}>
114114
<input type="radio" bind:group={opts.votes} value="blocknumber" />
115115
Block Number
116-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#governor">
116+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#governor">
117117
Uses voting durations expressed as block numbers.
118118
</HelpTooltip>
119119
</label>
120120
<label class:checked={opts.votes === 'timestamp'}>
121121
<input type="radio" bind:group={opts.votes} value="timestamp" />
122122
Timestamp
123-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#timestamp_based_governance">
123+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#timestamp_based_governance">
124124
Uses voting durations expressed as timestamps.
125125
</HelpTooltip>
126126
</label>

packages/ui/src/solidity/GovernorControls.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<label class:checked={opts.storage}>
148148
<input type="checkbox" bind:checked={opts.storage} />
149149
Storage
150-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/governance#GovernorStorage">
150+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/governance#GovernorStorage">
151151
Enable storage of proposal details and enumerability of proposals.
152152
</HelpTooltip>
153153
</label>
@@ -161,15 +161,15 @@
161161
<label class:checked={opts.votes === 'erc20votes'}>
162162
<input type="radio" bind:group={opts.votes} value="erc20votes" />
163163
ERC20Votes
164-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc20#ERC20Votes">
164+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc20#ERC20Votes">
165165
Represent voting power with a votes-enabled ERC20 token. Voters can entrust their voting power to a delegate.
166166
</HelpTooltip>
167167
</label>
168168

169169
<label class:checked={opts.votes === 'erc721votes'}>
170170
<input type="radio" bind:group={opts.votes} value="erc721votes" />
171171
ERC721Votes
172-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/token/erc721#ERC721Votes">
172+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/token/erc721#ERC721Votes">
173173
Represent voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.
174174
</HelpTooltip>
175175
</label>
@@ -193,7 +193,7 @@
193193
<label class:checked={opts.clockMode === 'blocknumber'}>
194194
<input type="radio" bind:group={opts.clockMode} value="blocknumber" />
195195
Block Number
196-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#governor">
196+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#governor">
197197
The token uses voting durations expressed as block numbers.
198198
</HelpTooltip>
199199
</label>
@@ -221,7 +221,7 @@
221221
<label class:checked={opts.clockMode === 'timestamp'}>
222222
<input type="radio" bind:group={opts.clockMode} value="timestamp" />
223223
Timestamp
224-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/governance#timestamp_based_governance">
224+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/governance#timestamp_based_governance">
225225
The token uses voting durations expressed as timestamps.
226226
</HelpTooltip>
227227
</label>
@@ -238,7 +238,7 @@
238238
<label class:checked={opts.timelock === 'openzeppelin'}>
239239
<input type="radio" bind:group={opts.timelock} value="openzeppelin" />
240240
TimelockController
241-
<HelpTooltip link="https://docs.openzeppelin.com/contracts/api/governance#GovernorTimelockControl">
241+
<HelpTooltip link="https://docs.openzeppelin.com/contracts/5.x/api/governance#GovernorTimelockControl">
242242
Module compatible with OpenZeppelin's <code>TimelockController</code>. Allows multiple proposers and executors,
243243
in addition to the Governor itself.
244244
</HelpTooltip>

0 commit comments

Comments
 (0)