teleren/devto huggingface dataset:
Cómo lanzar un Contrato Inteligente en Polygon zkEVM
Published: 2023-02-01 20:22:06

---
title: Cómo lanzar un Contrato Inteligente en Polygon zkEVM
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9oci6i2d693aslsjnxo.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-01 00:37 +0000
---

Layer 2 es sin duda el futuro de la tecnología blockchain. En este blog post, exploraremos cómo desplegar un contrato inteligente en Polygon zkEVM, uno de los protocolos de Layer 2 más prometedores para el 2023.

Actualmente, Polygon zkEVM se encuentra en la fase de beta abierta, lo que significa que ya podemos probar su versión en el Testnet Goerli. Es importante aprender a utilizar esta versión de prueba para estar preparados para su lanzamiento en el Mainnet.

## Antes de comenzar

Para este tutorial necesitarás [Metamask](https://metamask.io/) u otra wallet compatible con fondos en Goerli que puedes obetener desde un [faucet](https://goerlifaucet.com/).

## 1. Agrega las siguientes redes a Metamask

Nombre de la red: `Polygon zkEVM Testnet`
Nueva dirección URL de RPC: `https://rpc.public.zkevm-test.net`
Identificador de cadena: `1422`
Símbolo de moneda: `ETH`
Dirección URL del explorador de bloques: `https://explorer.public.zkevm-test.net`

Alternativamente puedes ingresar en el [bridge](https://public.zkevm-test.net/login) y hacer clic en "Add to metamask".

## 2. Envía fondos a Polygon

Obten `Goerli ETH` desde el [faucet](https://goerlifaucet.com/). Y envía fondos de Goerli L1 a Polygon zkEVM L2 a través del [bridge](https://public.zkevm-test.net/login). Para hacerlo asegúrate de colocarte desde Goerli Testnet.

![Polygon Bridge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5smffadfk61ucm2qeph.png)

## 3. Lanza un Smart Contract

Puedes lanzar este Smart Contract desde [Remix](https://remix.ethereum.org/), asegurate de colocar tu Metamask en Polygon zkEVM.

![Polygon zkEVM Metamask](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j21ssnfjettva5pkp5zb.png)

Y en la pestaña de lanzamiento selecciona "Injected Web 3".

![Polygon zkEVM Remix](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tpsnb8gky762uha9r9fe.png)

Y listo, luego de que hayas lanzado tu contrato haciendo clic en el botón "Deploy". Podrás ver tu contrato en el [Blockscout de Polygon zkEVM](https://explorer.public.zkevm-test.net).

## Más sobre Layer 2

Acabamos de lanzar dos cursos en colaboración con **Platzi** que cubren todo lo relacionado a la tecnología de Layer 2. Me apasiona este tema, por lo que me esforcé al máximo para crear cursos de alta calidad. Les proporciono los enlaces a ambos cursos a continuación, y al inscribirse estarán ayudando a apoyar este blog. ¡Los espero allí!

* **Introducción a Layer 2**: Si deseas ahorrar gas fees sin sacrificar seguridad este curso es para tí. Has click [aquí]() para registrarte.
* **Desarrollo en Layer 2**: donde cubrimos todas las bases que necesitas para crear DApps, protoclos o tokens encima de Layer 2. Has click [aquí]() para registrarte.
We're hiring: Senior Full Stack TypeScript Engineer - Berlin, Germany
Published: 2023-02-01 20:15:27

Would you like to build applications that will positively impact the health and fitness industry?

Our client is a High-Tech company that provides a service improving the daily health and life of customers in Germany. The role is a cornerstone in the product team, as the front end is the main digital customer interaction point to the vertically integrated product – from the physical machine to the customer mobile app.

The technology combines a physical fitness machine, modern apps, and a cloud-based backend with a host of data.
We are looking for a Senior Full Stack TypeScript Engineer to join the team, in Berlin, Germany.

Responsibilities:

Start as a Senior Full-stack and grow into a Team Lead role for all customer-facing applications
Shape customer training experience.
Be accountable for the delivery and technical foundation of the customer-facing applications
Define frontend architecture and tooling
Create simple and elegant visual solutions for the customers
Drive future product developments with the product owner.
Must-Have:

At least 5-6+
5-6+ years of Full-stack web development experience
3-4+ years of web and mobile development with React and React Native
TypeScript Knowledge
Experience with serverless web development
Interested in fitness/health
Ability to hire and develop a team of A-players for the frontend team
Excellent knowledge of frontend technologies, especially React and React Native in TypeScript
Capability to translate business requirements into compelling customer experiences
Thorough understanding of software architecture and tooling from UX, frontend to APIs and backend
Commitment to providing high-quality products on a consistent basis
Growth mindset to build trust and empower team members
Pragmatic but precise where required
Excellent and straightforward communication skills
Contract:
Full-time long-term commitment if you are in Germany
2-3 days/per week present on-site

Benefits
Full-time long-term employment
Attractive overall package
Professional growth opportunities
Pleasant work environment 
Apply here 👇
https://hr-champ.com/senior-fullstack-typescript-engineer/
5 important tips and tricks for React
Tags: react, javascript, beginners, tutorial
Published: 2023-02-01 20:14:58

### 1) Use State Correctly

State is an essential aspect of React and should be used wisely. It's recommended to keep the state minimal and only store values that change within the component.

```javascript
class Example extends React.Component {
  state = { count: 0 }
  
  handleClick = () => {
    this.setState({ count: this.state.count + 1 });
  };
  
  render() {
    return (
      <div>
        <p>You clicked {this.state.count} times</p>
        <button onClick={this.handleClick}>Click me</button>
      </div>
    );
  }
}
```

### 2) Use Props Correctly

Props are used to pass data from one component to another. It's recommended to keep the component pure, i.e., the component should only receive props and render the view.

```javascript
function Welcome(props) {
  return <h1>Hello, {props.name}</h1>;
}

function App() {
  return (
    <div>
      <Welcome name="Sara" />
      <Welcome name="Cahal" />
      <Welcome name="Edite" />
    </div>
  );
}
```

### 3) Use the Right Tools

React provides several tools to make development easier, such as React Developer Tools (browser extension) and Create React App. Make sure you're using the right tools for the job.

### 4) Write Clean Code

It's important to write clean and maintainable code, as it helps to reduce bugs and make it easier to understand and debug. A good rule of thumb is to follow the Airbnb JavaScript style guide.

```javascript
const names = ['Sara', 'Cahal', 'Edite'];

const namesList = names.map((name, index) => (
  <li key={index}>{name}</li>
));
```

### 5) Use Conditional Rendering

In React, it's possible to conditionally render components based on certain conditions. This can be done using if-else statements or ternary operators.

```javascript
function UserGreeting(props) {
  return <h1>Welcome back!</h1>;
}

function GuestGreeting(props) {
  return <h1>Please sign up.</h1>;
}

function Greeting(props) {
  const isLoggedIn = props.isLoggedIn;
  if (isLoggedIn) {
    return <UserGreeting />;
  }
  return <GuestGreeting />;
}

ReactDOM.render(
  <Greeting isLoggedIn={false} />,
  document.getElementById('root')
```
Day 3
Tags: beginners, css
Published: 2023-02-01 19:53:47

We reviewed material from the past 24 hours. Honestly, front-end development doesn't seem like my cup of tea. I want to find shortcuts to doing things like hand coding HTML pages. I want to find CSS templates, or a drag-and-drop type of editor so I don't have to painstakingly render a table. I guess we've been spoiled by many software programs that already let you do this - visually design something that looks great without knowing how to code (hello Canva!). I want to make things look nice, but not spend hours and hours adjusting HTML code to do so.
Introducing Today’s Problem series
Tags: codenewbie, programming, algorithms, motivation
Published: 2023-02-01 19:51:50

As I said in my first post, I will now introduce one of my posts themes.

This theme is going to be named as **Today’s Problem**. Each post within this theme will have topics related to:

- Data Structures and Algorithms
- Logic problems
- Anything that can help with developing problem solving 
 skills

The structure of the posts depend on that day’s topic, so it could vary a little, but mainly it will follow this structure:

- Talking about that day’s topic and what is going to be covered in that post
- Body of the topic
- Summary
- References

Coding examples will appear in every post, these will be written in pseudocode, or in a programming language like Python. Although, depending on the topic, there may be other programming languages that will make its appearence.

The code for each post should be found at: [Today's Problem](https://github.com/JessVimm/todays-problem)

So, now let’s get into it. See you soon!
Machine Learning Process
Tags: machinelearning, datascience, programming, tutorial
Published: 2023-02-01 19:40:08

### Introduction

To build a machine-learning model, we normally follow a step-by-step process. We can divide all the steps into three groups. Those are:

- Data Pre-Processing
- Modeling
- Evaluation

### Data Pre-Processing

After collecting the data, the first thing we have to do is clean the data. Data cleaning is the process of fixing or removing incorrect, corrupted, incorrectly formatted, duplicate, or incomplete data within a dataset. After cleaning the data, we have to split the data into training & test sets. We do it to avoid overfitting. I will explain it more in the upcoming blogs. Now we have to do feature scaling. This helps to ensure that features with different units of measurement or scales do not dominate the model training process. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c088d6hdyg60ips3whk4.png)

### Modeling

Now comes the most interesting part, model building. We have to build a model and train it using the training set that we got after splitting our data. We have to decide which model we should use according to the data we have. After completing the training part, now our model is ready to make predictions. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qlt2ddnfeluxiefqle6m.png)

### Evaluation

And finally, we move on to evaluations. We will calculate some performance metrics and make a verdict about our model, whether it's a good-fitting model and if it works for our data or not. And this is a very important step to make sure that the models we build really serve the purpose that they're designed for.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/83bg560q4j0qlg7p4egq.png)
Context Package in Go
Tags: go, webdev
Published: 2023-02-01 19:31:48

The context package in Go provides a way for developers to carry deadlines, cancellations, and other request-scoped values across API boundaries and between processes. The context package is a type that carries deadlines, cancellations, and other request-scoped values, such as metadata, across API boundaries and between processes.

Detailed explanation in my [blog](https://learngolangonline.com/posts/context-in-go?medium=devto)
How to fix "SyntaxError: Missing parentheses in call to ‘print’" in Python
Tags: python, syntaxerror, programming
Published: 2023-02-01 19:31:33

> ✋ **Update:** This post was originally published on my blog [decodingweb.dev](https://www.decodingweb.dev), where you can read the [latest version](https://www.decodingweb.dev/solved-syntaxerror-missing-parentheses-in-call-to-print-in-python) for a 💯 user experience. _~reza_

The error “SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(…)?” in Python happens when you use an old-style print statement (e.g., `print 'some value'`) in Python 3.

This long error looks like this:


```
File /dwd/sandbox/test.py, line 1
  print 'some text here'
  ^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
```

As the error explains, from Python 3, you must call the `print()` function:


```python
# 🚫 SyntaxError
print 'some text here'

# ✅ Correct
print('some text here')
```

You might get this error if you're running an old code by your Python 3 interpreter or copying a code snippet from an old post on Stackoverflow.

## How to fix the "SyntaxError: Missing parentheses in call to 'print'"?

All you need to do is to call `print()` with your string literal(s) as its argument(s) - and do the same to every old-style print statement in your code.

The `print()` function is much more robust than its predecessor. Python 3 enables you to adjust the `print()` function's behavior based on your requirements.

For instance, to print a list of text values separated by a character (e.g., a space or comma), you can pass them as multiple arguments to the `print()` function:


```python
# ✅ Using print() with multiple arguments:

price = 49.99
print('The value is', price)
# output: The value is 49.99
```

As you can see, the arguments are separated by whitespace. To change the delimiter, you can use the `sep` keyword argument:


```python
print('banana', 'apple', 'orange', sep=', ')
# output: banana, apple, orange
```

Python 3 takes the dynamic text generation to a new level by providing formatted string literals (a.k.a f-strings) and the `print()` function.

One of the benefits of f-strings is concatenating values of different types (e.g., [integers and strings](https://www.decodingweb.dev/python-typeerror-can-only-concatenate-str-not-int-to-str-fixed)) without having to cast them to string value. You create an f-string by prefixing it with `f` or `F` and writing expressions inside curly braces (`{}`):


```python
user = {
    'name': 'John',
    'score': 75
}

print(f'User: {user[name]}, Score: {user[score]}')
# output: User: John, Score: 75
```

In python 2.7, you'd have to use the `+` operator or printf-style formatting.

Please note that f-string was added to Python from version 3.6. For older versions, check out the `str.format()` function.

And that's how you fix the "SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?" error in Python 3.

Alright, I think it does it. I hope this quick guide helped you solve your problem.

Thanks for reading.
Wrapper function
Tags: node, javascript, beginners, tutorial
Published: 2023-02-01 19:12:20

Error handling in Node.js can be done using try-catch blocks, which allow you to handle exceptions thrown by your code. 

However, this approach can become **repetitive** and **verbose** when dealing with multiple error-prone functions. To avoid this, you can wrap these functions in a generic error-handling function (a "wrapper function") that takes care of catching any errors and handling them in a centralized way.

For example, you could define a wrapper function that receives a function as a parameter and returns a new function that automatically handles errors:

```js
const wrap = (fn) => (req, res, next) =>
  fn(req, res, next).catch(next);
```

With this wrapper function, you can simplify your error handling code by simply wrapping your route handlers:
```javascript
app.post("/shoot", wrap(async (req, res) => {
  const data = await doSomething();
  res.send(data);
}));
```

---

Let's work with a better example. 
### Old code
```javascript
exports.getAllTrips = async (req, res, next) => {
  try {
    const { id } = req.user;

    console.log(id);

    const trips = await Trip.find({ userId: id })
      .sort({ createdAt: -1 });
    if (!trips) return errorResMsg(res, 404, "No trips found");

    const dataInfo = {
      message: "Trips found",
      trips,
    };

    return successResMsg(res, 200, dataInfo);
  } catch (error) {
    next(error);
  }
};
```

#### New Code

First we create wrapper function
```js
// handle callback
const handleCallback = (callback) => {
  return async (req, res, next) => {
    try {
      await callback(req, res, next);
    } catch (error) {
      next(error);
    }
  };
};

```

---

Then use the `handleCallback` to wrap the route
```js
exports.getAllTrips = handleCallback(async (req, res) => {
  const { id } = req.user;
  const trips = await Trip.find({ userId: id }).sort({ createdAt: -1 });
  if (!trips) return errorResMsg(res, 404, "No trips found");

  const dataInfo = {
    message: "Trips found",
    trips,
  };

  return successResMsg(res, 200, dataInfo);
});
```

#### Conclusion
Wrapper function can be utilized to streamline the try/catch block and promote DRY (Don't Repeat Yourself) principles in coding.
CHAT GPT and AI DOMINATION!
Tags: chatgpt, elon, musk, tecnologyai
Published: 2023-02-01 19:31:32

ChatGPT é uma poderosa ferramenta de linguagem artificial desenvolvida pela OpenA[I](https://www.davirodriguesoficial.com.br). Com o uso de inteligência artif[i](url)cial e processamento de linguagem natural avançado, o ChatGPT permite conversas humanas e responde a perguntas de forma rápida e precisa. Além disso, ele está constantemente sendo treinado com dados atualizados, garantindo sempre informações precisas e relevantes. Seja para auxiliar na solução de problemas, fornecer informações ou simplesmente para conversar, o ChatGPT é uma ferramenta inovadora e diferenciada que mudará a forma como as pessoas interagem com a tecnologia.
[ACESSE O SITE OFICIAL DE DAVI RODRIGUES](https://www.davirodriguesoficial.com.br)
Client-Server Architecture Explained in Pictures
Tags: infographics, architecture
Published: 2023-02-01 19:18:00

---
title: Client-Server Architecture Explained in Pictures
published: true
description: An Infographic explaining basic of client-server architecture
tags: infographics, architecture
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/paxgeqj25yzr7hqt6qk7.png
# Use a ratio of 100:42 for best results.
published_at: current
---

Client-server architecture is really a backbone of almost all modern IT services you can imagine. Social networks, messengers, databases, you name it, they all implement this architecture. In the infographic below I did quickly summarized main aspects you should know about this architecture.

![Client-server architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wfon0jcsgiz9vt22uym5.png)
Which social media are you on?
Tags: discuss
Published: 2023-02-01 19:07:49

I used to have Twitter only. 
I like Twitter as great minds from different fields share thoughts and be friends, but it's daunting a few times. I felt behind and imposter with the nature of frenetic pace in Twitter. 

Yet, I still want to keep a few social media as I want to to make connections or share what I learn. 

Which social media do you use as a developer?
Month 2 of Job Searching Begins...
Tags: beginners, career, devjournal, discuss
Published: 2023-02-01 19:06:37

First month recap [here](https://dev.to/taepal467/my-journey-to-getting-my-first-tech-job-g2l)

Just to give an update on how my job searching is going, since the last blog entry, I have applied for an additional 8 jobs. So that makes it a total of 16 jobs thus far. 

![Job List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty9rb1bjoyk3a1u3iqxo.png)

So far no other interviews, and I have been rejected from 4 other companies that I applied to. The jobs that are highlighted with gray, are jobs I have not heard back from in over 2 weeks. 

I have been attending meetups and networking with people who are in a similar situation as I am. Either transitioning careers or looking for their first tech job as well. Nice to know there are other people on the same journey as me.

I know getting your first tech job isn't easy. And there will be lots of **No's** before I get that one **YES!**. But what I am noticing, not many junior positions available. Even the jobs that are considered 'junior' or entry level require 3-4 years _professional_ experience, and knowledge of about 10 frameworks and/or libraries! Another thing I am noticing, TypeScript is starting to become a common requirement now. And looks like jQuery is making a comeback at some companies as well. jQuery is pretty easy to pick up since it's basically like using JavaScript DOM. So after learning about React, it will be time to move on to learning TypeScript!

To those who read this, any advice is greatly appreciated! ☺️
osdc-2023-assignment4
Tags: osdc, github
Published: 2023-02-01 19:06:20


As part of the fourth assignment of the [OSDC](https://github.com/OSDC-Code-Maven/osdc-2023-01-public) we had to practice GitHub and create a new project.

I have started a project that its purpose is calculating the best  route between two places using both a private car and public transportation.

For this project I will need both google maps API and also some more data that is not available in google maps that I found in the [national database](https://info.data.gov.il/datagov/home/). 

The steps I did to practice GitHub are:
1) Opening the repository through the web.
2) Cloning the repo to local computer.
3) Updating the files in local computer.
4) Through terminal staging, committing and pushing the change.

Next stage of this practice is pulling the project after someone else have made a pull request and of course working on the project itself.
🎉 PyLadies Dublin Jan 2023 Meetup
Tags: pyladies
Published: 2023-02-01 18:32:23

Happy St. Brigid’s Day! Can’t believe it’s Feb and spring is in the air.

Apologies for lateness (again) of the post-event follow-up from last month's first meetup of the year. 

![Thank you](https://media.giphy.com/media/wIVA0zh5pt0G5YtcAL/giphy.gif)

💖 Thank you to everyone who came along to the virtual event last month, and nearly 100 views since. 🥳

🙌 Big thanks to Arthur and Uffa for speaking, and to Mick for helping out behind the scenes.

![Check this out](https://media.giphy.com/media/0zuCO8iK0IZsHHjmck/giphy.gif)

You can watch the video with timestamps via our [Youtube channel](https://www.youtube.com/live/kpj7i_sJk7g) also (the unedited on is viewable above).
👍 and subscribe to our Youtube channel: youtube.com/@pyladiesdublin

ℹ️ You can find slides, announcements via https://github.com/pyladiesdublin/jan-talks-2023

📢 If you have any announcements or questions: dublin@pyladies.com

![Thank you](https://media.giphy.com/media/kfvEdnjjcAoea0naii/giphy.gif)
🌈 I would like to thank our community partners (alphabetical order):

- [Coding Grace](https://codinggrace.com/): Streamyard
- [PSF](https://www.python.org/psf/): Meetup
- [PyLadies](https://pyladies.com/)

---

![Join us](https://media.giphy.com/media/l41YouCUUcreUabHW/giphy.gif)

# Next Meetup - FEB TUE FEB 21 (18:30)

🔍 We are still looking for speakers for this month, and it will be virtual. 

🤔 If you know someone or you are interested in speaking, please share or submit talk details form: https://share-eu1.hsforms.com/1HHEGqvm2Q_-B3vqjq53EfQf1bg5

If you wish to see a talk or workshop about something, drop us an email at dublin@pyladies.com - we are always open for ideas.

See you later this month!