【发布时间】:2019-03-03 12:11:52
【问题描述】:
我正在学习 Solidity,部署脚本是这样说的,
var Storage = artifacts.require("./Storage.sol");
var InfoManager = artifacts.require("./InfoManager.sol");
module.exports = function(deployer) {
// Deploy the Storage contract
deployer.deploy(Storage)
// Wait until the storage contract is deployed
.then(() => Storage.deployed())
// Deploy the InfoManager contract, while passing the address of the
// Storage contract
.then(() => deployer.deploy(InfoManager, Storage.address));
}
而且我在 Google 上似乎无法找到右箭头字符“=>”。
【问题讨论】:
-
我们在 javascript 胖箭头函数中调用 this,与匿名操作中的回调不同,您可以在父 (this) 的上下文中访问
标签: javascript solidity truffle