Honeypot is a way to catch hackers trying to break into your contract. In this video we will code a contract that looks vulnerable to reentrancy attack but actually isn't.
Use results data type in Sway to handle errors.
Code
https://github.com/t4sk/hello-sway
Playground
https://sway-playground.org/
Sway
https://fuellabs.github.io/sway
Fuel
https://www.fuel.network/
Take a course
https://www.smartcontract.engineer/
#Sway #SmartContract #Fuel #スマートコントラクト
Follow
https://odysee.com/@SmartContractProgrammer:8
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
...
https://www.youtube.com/watch?v=yG9EmIzJAYM
How to return multiple outputs from a function in Solidity? How to assign variables to function outputs?
#Solidity #SmartContract #Ethereum #スマートコントラクト
Remix
https://remix.ethereum.org
Code
https://solidity-by-example.org/function/
Take a course
https://www.smartcontract.engineer/
Follow
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=je7dWT6bEZM
Let's learn about DeFi. This video explains how to trade an ERC20 token for another using a decentralized exchange called Uniswap.
Overview 0:20
Solidity code 1:18
Test 4:46
Run test using Ganache 7:25
#DeFi #Uniswap #SmartContract #Ethereum
Code: https://github.com/t4sk/defi-by-example
# References
Uniswap https://app.uniswap.org/
Etherscan https://etherscan.io
Follow on Twitter: @ProgrammerSmart https://twitter.com/ProgrammerSmart
Join me on Discord: https://discord.gg/Ny8sPaj
Website: https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=qB2Ulx201wY
There is no easy way to generate a random number inside Solidity. You might think of using block hash and timestamp for the sources of randomness. But hold on! In this video I will explain how they can easily be computed from other smart contracts.
#Solidity #randomness #hack #blockhash #blocktimestamp
Code: https://solidity-by-example.org/hacks/randomness/
References
https://github.com/ethereumbook/ethereumbook/blob/develop/09smart-contracts-security.asciidoc
https://solidity-05.ethernaut.openzeppelin.com/
Remix IDE: http://remix.ethereum.org
Solidity: https://solidity.readthedocs.io
Follow on Twitter: @ProgrammerSmart https://twitter.com/ProgrammerSmart
Join me on Discord: https://discord.gg/Ny8sPaj
Website: https://smartcontractprogrammer.com
...
https://www.youtube.com/watch?v=8FF3IBTMeK0
Example of while loop in Sway
Code
https://github.com/t4sk/hello-sway
Playground
https://sway-playground.org/
Sway
https://fuellabs.github.io/sway
Fuel
https://www.fuel.network/
Take a course
https://www.smartcontract.engineer/
#Sway #SmartContract #Fuel #スマートコントラクト
Follow
https://odysee.com/@SmartContractProgrammer:8
https://twitter.com/ProgrammerSmart
https://discord.gg/bt8FK2wkcW
https://t.me/smartcontractprogrammer
...
https://www.youtube.com/watch?v=B7x20Vt8Zt0