Logo

dev-resources.site

for different kinds of informations.

Usando constant e immutable para reduzir o custo de gás

Published at
5/28/2022
Categories
solidity
portuguese
vyper
brownie
Author
maresia
Categories
4 categories in total
solidity
open
portuguese
open
vyper
open
brownie
open
Author
7 person written this
maresia
open
Usando constant e immutable para reduzir o custo de gás

Qual a diferença entre os dois modificadores?

constant não ocupa espaço no armazenamento do contrato mas só pode ser definido uma vez e somente durante a compilação. Será reservado apenas o espaço necessário no bytecode, sempre que for feito um acesso.

immutable não ocupa espaço no armazenamento do contrato mas só pode ser definido uma vez e somente durante a construção do contrato. Será reservado exatos 32 bytes no bytecode para cada acesso, mesmo se o tamanho da variável for menor.

vyper Article's
24 articles in total
Favicon
Vyper - Write your First Python Smart Contract (Series)
Favicon
vyper挺好玩的
Favicon
How to use 'initializes' and 'exports' in vyper: Modular Vyper code arrangement.
Favicon
A Simple Vyper smart contract to fetch the price of BTC using Chainlink and Apeworx.
Favicon
Vyper beginner's tutorial: Variables.
Favicon
Mastering Vyper Functions(part1 )
Favicon
How to compile, deploy and interact with smart contracts using Apeworx(ape) and VS Code.
Favicon
Vyper: For loops and Arrays.
Favicon
Mastering functions in Vyper(part2)
Favicon
Vyper Beginner's tutorial: Syntax and Structure.
Favicon
How to interact with Smart Contracts using Python and Django.
Favicon
How to Interact with Smart Contracts locally using web3.py
Favicon
Writing Smart Contracts using Vyper, Remix IDE and deploying them on BNB Smart Chain.
Favicon
Create your own Uniswap DeFi Application🦄! From scratch using Vyper & Python🐍
Favicon
Challenge #2: 🪙 Multi Token Vendor | Speedrun Ethereum With Vyper
Favicon
Introduction to EVM Smart Contract development
Favicon
Challenge #1: 🥩 Decentralized Staking App | Speedrun Ethereum With Vyper 🐍
Favicon
Challenge #0: 🖼️ Simple NFT Example | Speedrun Ethereum With Vyper 🐍
Favicon
Understanding Chainlink VRF: A Tool for Random Number Generation on the Blockchain
Favicon
Constant Product Market Maker (CAMM): The standard in Decentralized Finance
Favicon
Compiling and testing Vyper contract using Foundry
Favicon
Usando constant e immutable para reduzir o custo de gás
Favicon
ERC20 Token with Vyper and Brownie
Favicon
Try Vyper in Truffle v5.

Featured ones: