You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/content/developers/tutorials/erc20-with-safety-rails/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ If you want to see the complete source code:
23
23
24
24
## Creating an ERC-20 contract {#creating-an-erc-20-contract}
25
25
26
-
Before we can add the safety rail functionality we need an ERC-20 contract. In this article we'll use [the OpenZeppelin Contracts Wizard](https://docs.openzeppelin.com/contracts/4.x/wizard). Open it in another browser and follow these instructions:
26
+
Before we can add the safety rail functionality we need an ERC-20 contract. In this article we'll use [the OpenZeppelin Contracts Wizard](https://docs.openzeppelin.com/contracts/5.x/wizard). Open it in another browser and follow these instructions:
27
27
28
28
1. Select **ERC20**.
29
29
2. Enter these settings:
@@ -92,7 +92,7 @@ We want to add these requirements to the function:
92
92
93
93
- The `to` address cannot equal `address(this)`, the address of the ERC-20 contract itself.
94
94
- The `to` address cannot be empty, it has to be either:
95
-
- An externally owned accounts (EOA). We can't check if an address is an EOA directly, but we can check an address's ETH balance. EOAs almost always have a balance, even if they are no longer used - it's difficult to clear them to the last wei.
95
+
- An externally owned account (EOA). We can't check if an address is an EOA directly, but we can check an address's ETH balance. EOAs almost always have a balance, even if they are no longer used - it's difficult to clear them to the last wei.
96
96
- A smart contract. Testing if an address is a smart contract is a bit harder. There is an opcode that checks the external code length, called [`EXTCODESIZE`](https://www.evm.codes/#3b), but it is not available directly in Solidity. We have to use [Yul](https://docs.soliditylang.org/en/v0.8.15/yul.html), which is EVM assembly, for it. There are other values we could use from Solidity ([`<address>.code` and `<address>.codehash`](https://docs.soliditylang.org/en/v0.8.15/units-and-global-variables.html#members-of-address-types)), but they cost more.
97
97
98
98
Lets go over the new code line by line:
@@ -209,4 +209,4 @@ This is a cleanup function, so presumably we don't want to leave any tokens. Ins
209
209
210
210
## Conclusion {#conclusion}
211
211
212
-
This is not a perfect solution - there is no perfect solution for the "user made a mistake" problem. However, using these kind of checks can at least prevent some mistakes. The ability to freeze accounts, while dangerous, can be used to limit the damage of certain hacks by denying the hacker the stolen funds.
212
+
This is not a perfect solution - there is no perfect solution for the "user made a mistake" problem. However, using these kinds of checks can at least prevent some mistakes. The ability to freeze accounts, while dangerous, can be used to limit the damage of certain hacks by denying the hacker the stolen funds.
Copy file name to clipboardExpand all lines: public/content/translations/fr/developers/tutorials/erc20-with-safety-rails/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Si vous souhaitez consulter le code source complet :
24
24
25
25
## Création d'un contrat ERC-20 {#creating-an-erc-20-contract}
26
26
27
-
Avant de pouvoir ajouter la fonctionnalité de sécurité, nous avons besoin d'un contrat ERC-20. Dans cet article, nous utiliserons [l'assistant de contrats OpenZeppelin](https://docs.openzeppelin.com/contracts/4.x/wizard). Ouvrez-le dans un autre navigateur et suivez ces instructions :
27
+
Avant de pouvoir ajouter la fonctionnalité de sécurité, nous avons besoin d'un contrat ERC-20. Dans cet article, nous utiliserons [l'assistant de contrats OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/wizard). Ouvrez-le dans un autre navigateur et suivez ces instructions :
Copy file name to clipboardExpand all lines: public/content/translations/it/developers/tutorials/erc20-with-safety-rails/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Se desideri visualizzare il codice sorgente completo:
24
24
25
25
## Creare un contratto ERC-20 {#creating-an-erc-20-contract}
26
26
27
-
Prima di poter aggiungere la funzionalità della barriera di sicurezza, ci occorre un contratto ERC-20. In questo articolo utilizzeremo [la procedura guidata dei contratti di OpenZeppelin](https://docs.openzeppelin.com/contracts/4.x/wizard). Aprila in un altro browser e segui queste istruzioni:
27
+
Prima di poter aggiungere la funzionalità della barriera di sicurezza, ci occorre un contratto ERC-20. In questo articolo utilizzeremo [la procedura guidata dei contratti di OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/wizard). Aprila in un altro browser e segui queste istruzioni:
Copy file name to clipboardExpand all lines: public/content/translations/pt-br/developers/tutorials/erc20-with-safety-rails/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Se você quiser ver o código-fonte completo:
24
24
25
25
## Criando um contrato ERC-20 {#creating-an-erc-20-contract}
26
26
27
-
Antes que nós possamos adicionar funcionalidade de trilhos de segurança, nós precisamos de um contrato ERC-20. Neste artigo, usaremos o [o Assistente de contratos da OpenZeppelin](https://docs.openzeppelin.com/contracts/4.x/wizard). Abra-o em outro navegador e siga estas instruções:
27
+
Antes que nós possamos adicionar funcionalidade de trilhos de segurança, nós precisamos de um contrato ERC-20. Neste artigo, usaremos o [o Assistente de contratos da OpenZeppelin](https://docs.openzeppelin.com/contracts/5.x/wizard). Abra-o em outro navegador e siga estas instruções:
Güvenlik önlemi işlevini eklemeden önce bize bir ERC-20 sözleşmesi lazım. Bu makalede [OpenZeppelin'in Sözleşme Sihirbazı'nı](https://docs.openzeppelin.com/contracts/4.x/wizard) kullanacağız. Başka bir sekmede açın ve şu yönergeleri izleyin:
27
+
Güvenlik önlemi işlevini eklemeden önce bize bir ERC-20 sözleşmesi lazım. Bu makalede [OpenZeppelin'in Sözleşme Sihirbazı'nı](https://docs.openzeppelin.com/contracts/5.x/wizard) kullanacağız. Başka bir sekmede açın ve şu yönergeleri izleyin:
0 commit comments