因為今天要搭飛機離開台灣,因此在吵雜的機場裡面錄影的,效果可能很差QQ
接下來幾天因為要到日本去,如果在日本的網路因故悲劇,那就只能中斷了(._.)
本日合約:
pragma solidity ^0.4.25;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
require(c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0); // Solidity only automatically asserts when dividing by 0
uint256 c = a / b;
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a); // underflow
uint256 c = a - b;
return c;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a); // overflow
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0);
return a % b;
}
}
contract Main {
function test() public pure returns (uint256) {
uint256 a = 100;
uint256 b = 10;
return SafeMath.add(a, b);
}
}
本日影片:
https://youtu.be/9A0vAqjUFe0
Smart Contract 實戰教學播放清單:
https://www.youtube.com/playlist?list=PLHmOMPRfmOxSJcrlwyandWYiuP9ZAMYoF