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