如果都是字符串格式的拼接,使用
string(abi.encodePacked(tokenHost, _type))
如果 tokenHost 或者 _type 不是字符串格式,拼接可能会出错:
invalid code
分类目录归档:开发技巧
string(abi.encodePacked(tokenHost, _type))
invalid code
var contract = new web3.eth.Contract(cif (window.ethereum) {
window.web3 = new Web3(ethereum);
//
npm 遇到需要用到限时秒杀的功能。需要一个js选择时间的插件,从网上down了一个,插件是选择到秒的,24小时制。需要把
转换为12小时制的。本来使用的是 strtotime 函数,但是发现24小时制的字符串在使用这个函数转