https://stackoverflow.com/questions/34624510/how-to-use-makefile-in-docker-machine
tce-load -wi make
Use keythereum, web3
npm install keythereum npm install web3 .datadir need to correct.
UTC/keystore/UTC–2019-03-25T09-10-35.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.address need correct “0xooooooooooooooooooooooooo”
.password need correct, this example is empty.
.web3 localhost is fake, don’t need have geth.
var keythereum = require("keythereum"); var datadir = "UTC"; var address= "0xooooooooooooooooooooooooo"; const password = ""; var keyObject = keythereum.importFromFile(address, datadir); var privateKey = keythereum.recover(password, keyObject); console.log(privateKey.toString('hex')); Web3 = require('web3') web3 = new Web3(new Web3.providers.HttpProvider("localhost")); var address = web3.
https://segmentfault.com/a/1190000019776978
https://www.oxxostudio.tw/articles/201904/firebase-realtime-database-rules.html
https://angularfirebase.com/lessons/understanding-firebase-database-rules-by-example/
https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html#example
https://github.com/ethereum/solidity/blob/develop/Changelog.md
https://zhuanlan.zhihu.com/p/54169418
随着solidity 0.5.0 nightly build版本的稳步推进,正式版也将在不久的将来与开发者见面.作为一个大版本更新,新版引入了很多特性,也废弃了很多关键字,比如
.call()不仅可以获知远程调用执行成功与否,还将获得远程调用执行的返回值
ABI解码做了新的处理规范,有效防御了"短地址攻击"
address地址类型细分成 address和 address payable
uintY和 bytesX不能直接转换
回退函数必须显式声明为 external可见性
构造函数必须用 constructor关键字定义
用于抛出异常的 throw关键字弃用, 函数状态可变性修饰符必须用 view,不能混用 constant和 view
…
下面我们将对这些改变一一予以介绍,最后给出一个示例代码,对比展示新旧版solidity代码写法的区别,供大家参考.
显式声明
函数可见性
函数可见性必须显式声明. 之前, 函数如果不显式声明,将默认 public可见性.
public: constructor构造函数必须声明为 public可见性,否则编译报错.
external: 回退函数(fallback function), 接口(interface)的函数必须声明为 external可见性,否则编译报错.
存储位置
结构体(struct),数组(array),映射(mapping)类型的变量必须显式声明存储位置( storage, memeory, calldata),包括函数参数和返回值变量都必须显式声明.
external 的函数参数需显式声明为 calldata.
合约与地址
contract合约类型不再包括 address类型的成员函数,必须显式转换成 address地址类型才能使用 send(), transfer(), balance等与之相关的成员函数/变量成员.
address地址类型细分为 address和 address payable,只有 address payable可以使用 transfer(), send()函数.
address payable类型可以直接转换为 address类型, 反之不能.
但是 address x可以通过 address(uint160(x)),强制转换成 address payable类型.
https://github.com/google/material-design-lite