SlideShare a Scribd company logo
Algumas
Novidades da
Versão 0.6.x
Jeff Prestes - 2020-03-30
Agradecimentos e Creditos
Apresentação baseada no material do prof. Gerard Persoon da Universidade de
Ciências Aplicadas de Haia
Agradeço do prof. Gerard por gentilmente compartilhar o material.
Mais detalhes dos fontes originais de exemplo em:
https://github.com/web3examples/ethereum/blob/master/solidity_examples/
Meus exemplos melhorados estão em:
https://github.com/jeffprestes/ethereum-examples-hague-univ/solidity_examples
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Tipos Globais
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_globaltypes.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Funções Fallback & Receive
https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_fall
backreceive.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Nova forma de excluir item de array
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_mapping.sol
Usar ListParticipant.pop() ao invés de ListParticipant.length--
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
push
Não retorna mais o índice do novo elemento. Aliás, push(novoValor) retorna nada.
https://solidity.readthedocs.io/en/v0.6.0/types.html#array-members
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
ABIEncoderV2
Não é mais considerado experimental, só mantiveram a sintaxe por
retrocompatibilidade: https://solidity.readthedocs.io/en/v0.6.4/layout-of-source-files.html#abiencoderv2
Não usar com o otimizador:
https://solidity.readthedocs.io/en/v0.6.4/060-breaking-changes.html#yul-optimizer
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Novas features em herança: virtual e override
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_override.sol
Este artigo explica em detalhes:
https://forum.openzeppelin.com/t/how-we-plan-to-adopt-solidity-0-6-virtual-functions/2063
Aqui outros exemplos: https://solidity.readthedocs.io/en/v0.6.0/contracts.html#inheritance
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Multiplas sobrecargas de método
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_overridemultiple.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Métodos Abstratos
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_abstract.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Melhoria no compilador: alerta de "shadowing"
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_shadowing.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Polêmico: try catch
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_trycatch.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Casting de address para address payable
https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_addr
payablecasting.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Fatias de um array ou Array Slices
https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_slice.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Natspec - Pequena melhoria na doc gerada no retorno
https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_nats
pec.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
Mudança de como obter Endereços de funções externas
https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_addr
essexternal.sol
Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
That's all folks!
https://linkedin.com/in/jeffprestes
Mande PR ou dê uma estrela no repo dos exemplos
https://github.com/jeffprestes
E adicione-me no seu Linkedin

More Related Content

PPTX
IAC_PuppetCampLondon_2016
PPTX
Scalability
PDF
Best practices-for-production-environments
PPTX
How I built the demo's
PPTX
How to connect social media with open standards
PPTX
Le Tour de xUnit
PPT
Ferramentas de apoio ao desenvolvedor
PPT
Zerog Spinning Toys
IAC_PuppetCampLondon_2016
Scalability
Best practices-for-production-environments
How I built the demo's
How to connect social media with open standards
Le Tour de xUnit
Ferramentas de apoio ao desenvolvedor
Zerog Spinning Toys

Similar to Solidity 0.6.x (20)

PPTX
MDST 3703 F10 Studio 1
PDF
Serena DevOps Drive In - Patrick Debois Live on DevOps: 5 Years in, what does...
KEY
WordPress Theming: Getting Started
PPTX
A Deep Dive into the W3C WebDriver Specification
PDF
Ganeti Web Manager: Cluster Management Made Simple
PDF
CVPR2017 oral survey
PPTX
GitHub Data and Insights
PPT
My Experiment
PPT
Dave de Roure - The myExperiment approach towards Open Science
PPTX
Mahout Introduction BarCampDC
PPT
EJME: enriched journal articles with OJS, 2011-10-19
PDF
Feature flags, a/b testing, canary amd split traffic ~ hail new agile po
PDF
The New Design Workflow
PPTX
Apache Maven - eXo VN office presentation
PPT
An introduction to juice
PDF
Python & FUSE
PPT
Joomla Day Austin Part 4
PDF
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
PDF
Presentation distro recipes-2013
PPTX
Spring method-level-secuirty
MDST 3703 F10 Studio 1
Serena DevOps Drive In - Patrick Debois Live on DevOps: 5 Years in, what does...
WordPress Theming: Getting Started
A Deep Dive into the W3C WebDriver Specification
Ganeti Web Manager: Cluster Management Made Simple
CVPR2017 oral survey
GitHub Data and Insights
My Experiment
Dave de Roure - The myExperiment approach towards Open Science
Mahout Introduction BarCampDC
EJME: enriched journal articles with OJS, 2011-10-19
Feature flags, a/b testing, canary amd split traffic ~ hail new agile po
The New Design Workflow
Apache Maven - eXo VN office presentation
An introduction to juice
Python & FUSE
Joomla Day Austin Part 4
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Presentation distro recipes-2013
Spring method-level-secuirty
Ad

More from Jeff Prestes (20)

PPTX
Começando com Quorum - versão 2.6
PPTX
Desmistificando blockchain
PPTX
Aumento da eficácia jurídica com Smart Contracts
PPTX
Go (golang) - Porque ele deve ser a linguagem da sua próxima API
PPTX
Chatbots and Internet of Things
PPTX
Facebook Messenger and Go
PPTX
Physical web
PPTX
Beacons, Raspberry Pi & Node.js
PPTX
Eddystone Beacons - Physical Web - Giving a URL to All Objects
PPTX
Making Payments in Android Easy
PPTX
Kraken.js - Giving Extra Arms to your Node.js App
PPTX
Mobile Payments Workshop
PPTX
Building your own RC Car with Raspberry Pi
PPTX
How to make your Money Machine with Internet of Things
PPTX
Interact your wearable and an iot device
PPTX
Java Device I/O at Raspberry PI to Build a Candy Vending Machine
PPTX
RaspberryPi + IoT - Lab to switch on and off a light bulb
PPTX
Fazendo maquinas para ganhar dinheiro com Internet das Coisas
PDF
Test A/B
PPTX
Let your stuff talk!
Começando com Quorum - versão 2.6
Desmistificando blockchain
Aumento da eficácia jurídica com Smart Contracts
Go (golang) - Porque ele deve ser a linguagem da sua próxima API
Chatbots and Internet of Things
Facebook Messenger and Go
Physical web
Beacons, Raspberry Pi & Node.js
Eddystone Beacons - Physical Web - Giving a URL to All Objects
Making Payments in Android Easy
Kraken.js - Giving Extra Arms to your Node.js App
Mobile Payments Workshop
Building your own RC Car with Raspberry Pi
How to make your Money Machine with Internet of Things
Interact your wearable and an iot device
Java Device I/O at Raspberry PI to Build a Candy Vending Machine
RaspberryPi + IoT - Lab to switch on and off a light bulb
Fazendo maquinas para ganhar dinheiro com Internet das Coisas
Test A/B
Let your stuff talk!
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Getting Started with Data Integration: FME Form 101
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Machine learning based COVID-19 study performance prediction
PPTX
1. Introduction to Computer Programming.pptx
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25-Week II
A comparative analysis of optical character recognition models for extracting...
Getting Started with Data Integration: FME Form 101
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
MIND Revenue Release Quarter 2 2025 Press Release
Spectral efficient network and resource selection model in 5G networks
Machine learning based COVID-19 study performance prediction
1. Introduction to Computer Programming.pptx
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology

Solidity 0.6.x

  • 2. Agradecimentos e Creditos Apresentação baseada no material do prof. Gerard Persoon da Universidade de Ciências Aplicadas de Haia Agradeço do prof. Gerard por gentilmente compartilhar o material. Mais detalhes dos fontes originais de exemplo em: https://github.com/web3examples/ethereum/blob/master/solidity_examples/ Meus exemplos melhorados estão em: https://github.com/jeffprestes/ethereum-examples-hague-univ/solidity_examples Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 3. Tipos Globais https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_globaltypes.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 4. Funções Fallback & Receive https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_fall backreceive.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 5. Nova forma de excluir item de array https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_mapping.sol Usar ListParticipant.pop() ao invés de ListParticipant.length-- Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 6. push Não retorna mais o índice do novo elemento. Aliás, push(novoValor) retorna nada. https://solidity.readthedocs.io/en/v0.6.0/types.html#array-members Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 7. ABIEncoderV2 Não é mais considerado experimental, só mantiveram a sintaxe por retrocompatibilidade: https://solidity.readthedocs.io/en/v0.6.4/layout-of-source-files.html#abiencoderv2 Não usar com o otimizador: https://solidity.readthedocs.io/en/v0.6.4/060-breaking-changes.html#yul-optimizer Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 8. Novas features em herança: virtual e override https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_override.sol Este artigo explica em detalhes: https://forum.openzeppelin.com/t/how-we-plan-to-adopt-solidity-0-6-virtual-functions/2063 Aqui outros exemplos: https://solidity.readthedocs.io/en/v0.6.0/contracts.html#inheritance Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 9. Multiplas sobrecargas de método https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_overridemultiple.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 10. Métodos Abstratos https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_abstract.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 11. Melhoria no compilador: alerta de "shadowing" https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_shadowing.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 12. Polêmico: try catch https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_trycatch.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 13. Casting de address para address payable https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_addr payablecasting.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 14. Fatias de um array ou Array Slices https://github.com/web3examples/ethereum/blob/master/solidity_examples/sol6_slice.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 15. Natspec - Pequena melhoria na doc gerada no retorno https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_nats pec.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 16. Mudança de como obter Endereços de funções externas https://github.com/jeffprestes/ethereum-examples-hague-univ/blob/master/solidity_examples/sol6_addr essexternal.sol Jeff Prestes https://linkedin.com/in/jeffprestes https://github.com/jeffprestes
  • 17. That's all folks! https://linkedin.com/in/jeffprestes Mande PR ou dê uma estrela no repo dos exemplos https://github.com/jeffprestes E adicione-me no seu Linkedin