ether-smartcontract-learning

以太坊智能合约学习笔记

2020中秋节部署Uniswap仿盘

panswap

WETH : 0xc778417E063141139Fce010982780140Aa0cD5Ab

Router02 : 0x8D57Af23edC44A4614469Abb09608b1849814b84
Router02(Kovan) : 0x8D57Af23edC44A4614469Abb09608b1849814b84

https://lzzen.github.io/panswap/

PANT : 0x8eF06906cA5dA1ab4630CC6009C1Bc2fc7F789a3
PANT(Kovan) : 0xf4ad6fcffcd1588a37ef6493bdb02f6f1eb62b73
  • 问题1:Ropsten网络报错:MetaMask - RPC Error: gas required exceeds allowance (8000000) or always failing transaction

{code: -32000, message: "gas required exceeds allowance (8000000) or always failing transaction"}

  • 问题2:Kovan网络报错:inpage.js:1 MetaMask - RPC Error: The execution failed due to an exception.

{code: -32016, message: "The execution failed due to an exception.", data: "Reverted"}

2020中秋节部署CryptoZombies

Lint

  • 测试节点

https://ropsten.infura.io/v3/8a264ceb1d1c4ab1a8acaf93fab04f15

  • 崔式发币

https://github.com/Fankouzu/smart-contract/tree/master/Solidity%20Lesson%2003

  • 部署

truffle migrate --network ropsten

  • 控制台

truffle console --network ropsten

  • 打印

truffle(ropsten)> CryptoZombies

  • 崔式打印
var myCoin
CryptoZombies.deployed().then(function(instance){myCoin=instance})
myCoin