You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

1 Días
13 Hrs
5 Min
24 Seg

Cómo desplegar nuestro contrato en Ropsten

20/21
Resources

Having your smart contract finished, now it's time to make a deployment on a test network.

Ethereum test networks

The Ethereum ecosystem offers several test networks that you can use to make contract deployments and test their functionality.

The most important Ethereum test networks are:

  • Ropsten (deprecated)
  • Rinkeby (deprecated)
  • Goerli
  • Sepolia

Deprecation of test networks.
For the purposes of this exercise the Ropsten network was used, but note that this network is already deprecated, as is the Rinkeby network. It is advisable to use the Goerli network, following exactly the same steps as you will see in this guide.

Your first wallet

Don't have a wallet? You will need one, but don't worry, it's super easy to install and set up a wallet.

Wallets will allow you to sign transactions you make in any smart contract. They are indispensable to be able to deploy a contract first on a test network and interact with it later.

For this purpose, we will use the pioneer in the Blockchain world and most popular wallet called Metamask.

Step 1: Installing Metamask

Start by installing the Metamask extension on your corresponding Google Chrome or Mozilla Firefox browser. You can also find the app for Android or IOS.

Step 2: Account creation

Once the app is installed, follow the steps to create an account. The most important thing to keep in mind is the following:

You will need to create a password to access it. This password is unique per device, which means that in another browser or in the mobile app, you will not necessarily be able to access your account with the same password.
image.png

The passwords on each device serve as security and quick access to your wallet. The real password is the one that will be given to you later, your "seed key" or recovery phrase. It is a set of 12 to 24 random words that together will form the private key that you should not give to anyone. If you do, you may lose your cryptoassets.
image.png

You will have to meticulously save your words and confirm it to access your wallet. The order of the words is also very important, so be sure to record each one well.
image.png

Once you have successfully confirmed your recovery phrase, you will have access to your wallet and will be able to interact with a smart contract.

Ether Faucets

Proof networks use fictitious and worthless ETH and you can get it through a faucet.

Faucets are applications that deliver proof tokens into your wallet that you can later use to pay transaction fees on your contract and interact with it.

:::(Info) (How Faucets work)
Depending on how the Faucet works, entering your wallet address is enough to receive tokens once a day. Other Faucets are more limited to avoid spam and request contact by Twitter or Facebook to validate the addresses.
:::

Step 1: Locating a suitable faucet.

To receive trial ETH, you must find a faucet that connects to the Ethereum network you want to use. You will be able to find many faucet for each of the networks, you just need to ask Google:

Step 2: Request for trial ETH

Copy the address of your wallet to request ETH, you can find it by clicking on the top of the Metamask interface.

image.png

Use the address in the faucet you have chosen to use and in a few minutes the ETH should arrive in your account.

image.png

Deployment of the contract

The time has come. After choosing the test network, creating a wallet and requested dummy ETH, Remix will help us deploy the contract in Ropsten.

For this, you must first change the network in your Metamask very easily from your wallet:
image.png

Already in Remix, before deploying your contract you must select in ENVIRONMENT: "Injected Provider - Metamask".
image.png

This will allow you to click on the Deploy button and Metamask will ask you to confirm the transaction.

image.png

You will be able to observe in the Remix console the activity and deployment of your contract. Also pay attention to the transaction, as you have had to pay a commission for the deployment of a contract.

Congratulations! This may have been your first smart contract deployment.

Conclusion

There are many ways to deploy smart contracts. Remix has its own, but you will also find others working with development environments like Truffle or Hardhat.

The important thing here is to take your first steps and understand how professional software development works and the whole lifecycle of a smart contract.


Contribution created by: Kevin Fiorentino (Platzi Contributor).

Contributions 14

Questions 6

Sort by:

Want to see more contributions, questions and answers from the community?

La mejor faucet que he encontrado hasta ahora es la de Paradigm. Te da ETH, WETH, DAI y algunos NFTs en 8 testnets (Ropsten, Kovan, Rinkeby, Optimistic Kovan, Arbitrum Rinkeby, Avalanche Fuji, Görli y Polygon Mumbai).

Si no les aparece Ropsten, recuerden activar esto:

Show/hide test networks

Ropsten

  • Es una testnet una red de prueba de Ethereum donde se pueden probar transacciones tal como se harían en la red principal.
  • El dinero que usa no tiene valor

Página oficial de Metamask

Estuve más de una hora tratando de que RemixIDE me reconociera la red de Metamask… y no podía hacerlo de ninguna forma… al final, SÓLO TENÍA QUE REINICIAR REMIXIDE y anduvo perfectamente.

Dejo esto por acá porque tal vez le ahorre tiempo a más de uno.

Ropsten no funciona más, no está entregando nuevos ETH…

Así que lo hice con Rinkeby (que era la más usada hasta ahora, pero será deprecada luego del Merge, y pasará a ser Goerli)

En mi caso estaba utilizando RemixIDE versión desktop, ahi no aparece el enviroment Injected Web3. Para poder vincularlo a la red de pruebas de ropstein debes seguir los siguientes pasos:

  1. Creas una cuenta en el sitio https://infura.io/
  2. Dentro del sitio (INFURA) creas una llave nueva y copias el Api Key.
  3. En RemixIDE seleccionas el enviroment **Wallet Connect **y pegas tu Api Key. Debe aparecer un QR en la pantalla.
  4. En tu dispositivo móvil instalas app Metamask disponible en las tiendas de Appstore y Playstore.
  5. En la app entras con tus palabras de recuperación que puedes ver en el plugin de metamask en el navegador, accediendo a Configuración -> Seguridad y Privacidad.
  6. Al entrar en la app selecciona la red de pruebas que estas usando, Ropstein en mi caso.
  7. Presiona en el botón de capturar QR que esta en la esquina superior derecha y captura el QR que dejamos en el IDE.
  8. Finalmente nuestra wallet ya se muestra dentro de Remix y puedes hacer el deploy.

También pueden usar Rinkeby ,yo uso este faucet porque me permite pedir hasta 18 Ether de una vez pero debes de poner un tweet con tu Address
Rinkeby Faucet

También pueden obtener ETH de prueba, desde Metamask faucet.metamask.io/

Contrato del curso desplegado en 2023 Goerli

Si no ven las redes de prueba den click en show/hide test networks y habiliten la opción de “Show test network”

El día de hoy 2022-07-25, al entrar en https://faucet.ropsten.be/ aparece el mensaje:
.
Ropsten Faucet The faucet has reached its end of life. Thank you for using the faucet.
.
How to get Ropsten Fake ETH in 2022?
.
https://www.reddit.com/r/ethdev/comments/td4sks/how_to_get_ropsten_fake_eth_in_2022/
.
.
@skeptical-0ptimist | 2022-07-25
https://ropsten.oregonctf.org/
.
This faucet run by Oregon University, had to provide Google sign on but sent me 5 eth

  • El contrato desplegado por el profe Aqui

Faucet para Goerli 2023 con registro previo: https://goerlifaucet.com/

Gracias por el curso excelente.