- contracts目录新建MyContract.sol
pragma solidity ^0.4.23;
contract MyContract {
function mulAtoB(uint a,uint b) pure returns (uint){
return a * b;
}
}
- migractions目录新建2_initial_migration.js
var MyContract = artifacts.require("./MyContract.sol");
module.exports = function(deployer) {
deployer.deploy(MyContract);
};
- deploy后
