Skip to content

Latest commit

 

History

History
539 lines (403 loc) · 50 KB

solidity.md

File metadata and controls

539 lines (403 loc) · 50 KB

drawing

Contracts that use the tx.origin to authorize users are vulnerable to phishing attacks.

How to Solve "Struct Containing a (Nested) Mapping Cannot be Constructed" in Solidity

How to create a BEP-20 token on BSC using Remix.

In level 3 you have to play a game: coin flip. To complete this level you'll need to guess the correct outcome of a coin flip 10 times in a row

How did we bypass the sweeper bot and saved $26K tokens in the Dark Forest of Blockchain ?

Overflow is a situation when uint reaches its byte size. Then the next element added will return the first variable element. This is only for <0.8 Solidity.

The attacker can create a contract with a selfdestruct() function, send ether to it, call selfdestruct(target) and force ether to be sent to a target.

In general, I’ve found there to be 5 classes of Solidity exploits. Each exploit has a certain “code smell” associated with it.

A list of basic blockchain terms every beginner should know.

This is the first article in a series teaching Solidity. We will create a contract for two business partners that don''t trust

In challenge 5 you are given 20 tokens to start with and you will beat the level if you somehow manage to get your hands on any additional tokens.

Reentrancy attack is one of the most destructive attacks in Solidity smart contract. It occurs when a function makes an external call to another

Here I'd like to introduce a website developed by me and my friend in order to provide a better experience for Ethereum smart contracts developers and blockchain enthusiasts - https://justsmartcontracts.dev/. But first I'm going to explain the reasons lead to creating of this website.

Hey everybody, this is the second post of the series on writing apps the Git way, where you just go take a cup of coffee and browse a Git repo to learn something new!

Non-Fungible Tokens (NFTs) have gained significant popularity in the blockchain space, enabling creators to tokenize and sell unique digital assets.

3/23/2023: Top 5 stories on the Hackernoon homepage!

how to create a mapping in solidity

A Merkle tree is a data structure hierarchy used to verify if a particular data is part of a dataset without expending too many resources.

Learn how to build a notes taking app using web3 storage app in 4 simple steps, using nexts, typescript, ipfs, and zk block.

In level 4 of the Ethernaut Game, our goal is to claim ownership of the Telephone contract.

This tutorial combines blockchain technology, real-time communication, and user-generated content to create an interactive platform that rewards users for their

In this article, I modeled how to visualize codes, and also visually told you how developers or hackers read these codes.

The world of work is changing, and more and more businesses are looking for employees with web3 skills. Here is where you can find job openings online.

First things first, it’s called Vyper, not Viper.

Claim ownership of the contract. Reduce the balance of the contract to 0.

Given the vast potential of blockchain technology, it's no surprise that there is high demand for workers with blockchain engineering skills.

In this tutor, we will set up Hardhat with Typescript. Hardhat is a development environment for compiling, deploying, testing, and debugging Solidity Smart Cont

A gas efficient alternative to ECDSA and Merkle Trees for airdrops and presales.

In this tutorial, you will learn the following; How to set up an Error-free Web3 project, How to code an NFT minting smart contract, How to code the frontend...

How to implement better price feeds in smart contracts

Learn how to implement Flash swap using Uniswap!

In this guide, we'll be diving into solidity vulnerabilities and exploiting a solidity constructor.

Deploying a smart contract to the Ethereum Network is not as complicated as the process may appear. You only need to finish eight steps to get yours online.

This is an in-depth series of Blogs around OpenZeppelin's smart contract security puzzles. The aim of blogs is to provide a detailed explanation regarding various concepts of Solidity and EVM required to solve a Puzzle. It is highly recommended to attempt to solve these puzzles before reading further.

Smart Contracts are immutable, transparent, secure, and decentralized. Follow this example to learn how to write them with the programming language solidity.

In this short tutorial, I would like to show you the basics of events in Solidity.

With a $4 billion market cap in 2022, and a daily trade volume of approx $150 million, here's how a non-technical person built the biggest DEX in the world.

Re-entrancy attacks in Ethereum smart contrats explained, how to develop, how to avoid them, and how to circumvent them.

This is the second part of my series around Ethernaut Game. In this post, we will deal with Level 2: Fallout.

How to code a minimalistic NFT contract on the Ethereum blockchain in Solidity

Mastering how to create, read, update, and delete records from the blockchain is a skill you must understand. Yes, you can delete stuff from the blockchain...

In this article, I'm going to give you a roadmap and some of the best resources on the internet that will definitely help you get your first job in Web3.

Following part one of this tutorial, we will be building the frontend side of this project.

We will create ERC-721 smartcontract, deploy to Goerli with Hardhat + Solidity. For minting we will use NextJs + WalletConnect + Web3Modal

Unleash the power of decentralized finance by building your own DeFi protocol on the Ethereum blockchain using Hardhat.

Put tokenized items for sale in a decentralized classifieds board

This blog delves deep into how I created an onchain Loot Royale NFT Collection Dapp - both smart contract and frontend in the most detailed manner possible

Including a code sample using the ERC721 standard.

Today, cryptocurrencies and blockchain have changed a lot of traditional methods and solutions.

In this article I’ll introduce an implementation for Singly and Doubly Linked Lists, which you can reuse or modify for your own purposes. All the code is available in github or as an npm package.

There are a lot of different gambling platforms out there. But there is almost no project that offers a transparent and fair experience. Let's fix that!

Including a code sample using the ERC20 token standard.

Find the Length of Any String in Solidity.

Smart contracts, blockchains, crypto wallets, and more

In PART ONE of this tutorial, we coded the smart contract part of this application with Solidity, now it's time we merge it up with ReactJs.

Now let’s build the frontend for interacting with it as you can see above. Not much talking, let’s get coding… We’ll begin by installing the rest of the depend

If you’re a Solidity developer, you’ll be excited to hear that Truffle now supports console logging in Solidity smart contracts.

Solidity design patterns are essential for creating secure, robust and scalable smart contracts. In this tutorial, we will learn proper implementations

Write, test and deploy an NFT with Foundry and Figment Datahub.

You decide who does what with your smart contracts

This tutorial will teach you how to build a decentralized blockchain application from the ground up that will interact with a ReactJs frontend.

Learn how to code crowdsale smart contracts in a solidity programming language. Get to know its properties, processes, and phases for better understanding.

The demand for Web3.0 solutions is at an all-time high, but there isn't enough material available to usher in the army of developers required to fill the job op

Ethereum, the world’s first and dominant smart contract platform, has the largest dapp ecosystem with more than a million deployed smart contracts and hundreds of millions of dollars in monthly transactions

The Forward Trust design pattern used in the Yield Protocol simplifies integration and makes scaling easier.

Random numbers in Solidity for Ethereum using the Niguez Randomity Engine

Getting started with Foundry by developing, testing, deploying, and verifying your smart contracts with Foundry

Original Image by ipopba from Getty Images Pro

This article discusses smart contracts, ethereum, blockchain, decentralization, and the state of DeFi.

Learn how an Ethereum smart contract can pay your kids, employees, or whomever quickly, fairly, and automatically. No more banks, no more headaches.

How technologies are empowering global citizens to take action for the benefit of humanity

TL;DR

Wondering how to implement Drizzle using React Hooks?

we'll take a look at how to create a smart contract that can be used to conduct a raffle draw on the Ethereum blockchain.

Multi-Token Standard (ERC1155) was introduced in 2018 by Enjin.

Connecting Your Decentralized Application (Dapp) with a Backend: A Step-by-Step Guide.

Upon completion, you will have gained a deeper understanding of how to programmatically transmit Ethers and will have a working sample for future reference.

Smart contracts are a unique class of software explicitly designed to manage ownership of valuable digital assets. While existing programming environments can be used to keep track of the ownership of assets, they are most typically used in scenarios where they are reflecting ownership rather than defining it directly. Smart contracts are unique in that the value they represent is often embodied directly in the state they maintain.

This blog post describes the Remix IDE, its key high-level features and how to write and debug your first Solidity smart contract. Read on to know more…

Tokens are an incredibly important part of Ethereum and in Web3. Understanding the standards for each type of token can help you understand how it works.

We rely on Slither — a static analysis tool from Trail of Bits to maintain the quality of our audits. Considering the ease of use, it’s a good idea to try it!

Public blockchains enable us to build decentralized web applications (Dapps) that are censorship-resistant and have built-in economic incentives.

Ethereum development, while still very nascent in feel, has come a long way. When I started developing Solidity smart contracts and Ethereum dapps in 2017, Truffle and Web3.js were the industry standard. These are great tools and I have tons of respect for the people that built them. However, anyone who has used them has dealt with bugs and sometimes poor developer experience. There are a few new tools out there that have clearly been inspired by these first sets of tools and made the developer process much better.

Hey dapp developers! Today I am excited because I am posting the step-by-step process that allowed me to deploy my first Ethereum smart contract on the Ropsten testnet.

You can find partially explained material for ERC token standards, but I have come up with these articles to explain about three major token standards.

In this tutorial, you will learn step-by-step how to implement a decentralized autonomous organization (DAO) with anonymous chat features.

The Cosmos network is one of the most promising blockchain networks that enable interoperability between different blockchain platforms.

This blog post describes the integer division error in Ethereum smart contracts and how this error can be prevented. Read on to know more…

All but the simplest of Ethereum applications are composed of several smart contracts. This is because of a hard limit of 24KB in any deployed contract, and because your sanity will slip away as the complexity of a smart contract grows.

This story is the second part of my ERC series, in this post, you will get a complete understanding of the NFT contracts. Development, working etc.

In this tutorial, you will learn how to create a profitable and well-designed NFT marketplace with chat functionality.

TLDR: Eternal Storage provides the stable and flexible base needed to build and maintain long-lived decentralized applications.

Three example configurations for the new OpenZeppelin access control contract.

Ethereum is a blockchain with a built-in Turing-complete programming language. It allows anyone to create a decentralised application, by making use of Ethereum smart contracts.

This solution provides a level of security that is enough to automate critical decision making in any DAO such as automatic protocol modification or even autom

In this tutorial we’ll be walking through building and deploying a decentralized lottery smart contract in Solidity using [Hardhat].

In this tutorial, you will learn a very crucial smart contract skill for disbursing money (Ethers) to multiple accounts with a click of a button.

Imagine you are writing a Solidity smart contract and one of its properties can be characterized as a type or state. In other words, something from a limited set of options. You immediately say to yourself: ”Great, I’ll just use enum type for this state variable.” On the one hand, this approach has some benefits like increased readability. On the other hand, it can easily take you down a tricky road potentially leading to problems.

In late 2019, the Aragon Project, decided to leave the Polkadot ecosystem due to the lack of a viable blockchain virtual machine at the time. After that, the Polkadot team added EVM support on the Substrate framework, enabling EVM blockchains in the Polkadot ecosystem. 

In this article, we will create a simple full-stack application using React, Hardhat, Solidity, Ethers.js, and Metamask that can be used as a boilerplate.

Smart contracts, in general, offer the ability to determine factors and expectations set out by the contract. In the field of programming, factors and expectations can be described as ‘variables’ and ‘conditions’ within the actual code.

Blockchain is one of the most revolutionary technologies in today’s tech space. It has transformed businesses and is touted as the main component of the fourth industrial revolution. It is the first permanent, decentralized ledger of records that has revolutionized the system of records. 

How to Write Upgradable Smart Contracts

Web3, blockchain, NFTs?! It’s all getting a bit year 3000 out there… We’ve pulled this apart to better understand what the future of work looks like for develop

Building great applications takes both decentralized and centralized databases, and so Koinos is being designed to enable developers to integrate a decentralized database into their stack regardless of how much or how little they want to rely on that database.

Governors approving a change should know which functions are being called, what parameters are being used, and what effects these will have.

It takes a lot of time and labor to go through each NFT smart contract to retrieve data. Different pre-built NFT APIs can be utilized to address this problem.

Unlike my sleeping pattern, design patterns are meant to make things more stable and predictable in the future. It is an elegant solution to common problems in software design.

The Decentralized Flexible Organization is a new concept, that reshapes how we’re building Decentralized Applications, solving some critical points of failure in the today’s Dapp ecosystem like the needs of a Legal Known Entity to Trust, the slowly Smart Contract Developing and the Centralized or Distributed Servers Needs.

An introduction to hacking web3 and smart contracts

If you want to become a smart contract developer on Ethereum, then you need to learn Solidity. Let's look at 10 great sources that can help you on your journey.

This blog post describes the integer overflow/underflow vulnerability in Ethereum smart contracts and how it can be fixed. Read on to know more…

In Part 2, we’ll be using the API3 QRNG to get truly random numbers into our contract.

This blog post introduces the smart contract reentrancy attack bug and its impact along with describing fixes for this type of vulnerability. Read on...

As a developer, Ethereum keeps you on your toes. On the plus side, you constantly learn something new and the thrill of the “aha” moments is undeniable.

This is an in-depth series of Blogs around OpenZeppelin's smart contract security puzzles. The aim of blogs is to provide a detailed explanation regarding various concepts of Solidity and EVM required to solve a Puzzle. It is highly recommended to attempt to solve these puzzles before reading further.

This blog describes the access control vulnerability in Ethereum smart contracts and the various fixes available. Read on to learn more…

You’ve likely heard of Ethereum in the context of cryptocurrency, but perhaps not so much in the context of enterprise software.

This article is a tutorial about creating a full-fledged NFT-minting dapp for the Flow Blockchain.

‘Smart contracts’ is a misnomer. Despite its name, smart contracts on Ethereum are not self-executing digital agreements. Smart contract code only run when triggered by an external account. In other words, you need an external process to trigger the smart contract.

This tutorial shows you how to build an NFT auction site using React, Solidity, and CometChat. We will use React for the front end and Solidity for the smart co

A complete guide to building, running & deploying a DApp with your own Text-to Image script to mint AI-generated art NFTs on FVM Hyperspace Testnet!

To begin with, What exactly are TOKENS ?

What you need to know about writing smart contracts on the Tezos blockchain when you come from Ethereum

So easy, an ape could do it. Thoughts from the lead developer and Top Ape at SnowApe, a Web3 real money gaming project that made a blockchain app from scratch.

Web3 development is officially the new way to build web applications, and if you are not there yet, you need to catch up. The way to master building web3...

Are you looking to create a cutting-edge platform that leverages the power of web3 to transform the way people book and share accommodations?

I asked 10 Web3 Blockchain Developers how they started in Web3, their core skills, the challenges they face and how they can help newbies navigate this path.

Now, it's time for you to learn the ultimate trick in building a decentralized voting system.

In general, delays in updating the state of the smart contracts can allow users to "Double-Spend"

I call it the Ethereum Gatling Gun

Prior to commencing this tutorial, please ensure that you have installed the following RSK workshop pre-requisites on your system:

How do you develop a smart contract for your Dapp? How do you best design the Dapp interface? How do you connect the front end to the backend smart contract?