使用底层的call 调用,可以带 bytes 类型的 DATA 数据, 例如:
address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
参考文档:
类型 — Solidity中文文档 — 登链社区 https://learnblockchain.cn/docs/solidity/types.html#address
使用底层的call 调用,可以带 bytes 类型的 DATA 数据, 例如:
address(nameReg).call{gas: 1000000, value: 1 ether}(abi.encodeWithSignature("register(string)", "MyName"));
参考文档:
类型 — Solidity中文文档 — 登链社区 https://learnblockchain.cn/docs/solidity/types.html#address