SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
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

Más contenido relacionado

Similar a Solidity 0.6.x

WordPress Theming: Getting Started
WordPress Theming: Getting StartedWordPress Theming: Getting Started
WordPress Theming: Getting Started
professor44
 
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Distro Recipes 2013 : Contribution of RDF metadata for traceability among pro...
Anne Nicolas
 
Presentation distro recipes-2013
Presentation distro recipes-2013Presentation distro recipes-2013
Presentation distro recipes-2013
olberger
 

Similar a Solidity 0.6.x (20)

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

Más de Jeff Prestes

Más de Jeff Prestes (20)

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

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

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
  • 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
  • 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