Open QianGuoZi opened 2 years ago
代码贴得好丑,再贴一次((
// GetId is a free data retrieval call binding the contract method 0xd4e2e579.
//
// Solidity: function get_id(string idStr) constant returns(int256)
func (_Tls *TlsCallerSession) GetId(idStr string) (*big.Int, error) {
return _Tls.Contract.GetId(&_Tls.CallOpts, idStr)
}
// SetIdDTrace is a paid mutator transaction binding the contract method 0xbbf74676.
//
// Solidity: function setIdDTrace(int256 _idA, int256 _idD) returns(int256)
func (_Tls *TlsSession) SetIdDTrace(_idA *big.Int, _idD *big.Int) (*types.Transaction, *types.Receipt, error) {
return _Tls.Contract.SetIdDTrace(&_Tls.TransactOpts, _idA, _idD)
}
abigen没有生成解析写接口的返回值的代码,TODO
solidity(v0.4.25)中写函数的返回值似乎无法解析出来,读函数需要添加constant关键字才可以拿到返回值(view关键字没有尝试)
// SetIdDTrace is a paid mutator transaction binding the contract method 0xbbf74676. // // Solidity: function setIdDTrace(int256 _idA, int256 _idD) returns(int256) func (_Tls *TlsSession) SetIdDTrace(_idA *big.Int, _idD *big.Int) (*types.Transaction, *types.Receipt, error) { return _Tls.Contract.SetIdDTrace(&_Tls.TransactOpts, _idA, _idD) }
// GetId is a free data retrieval call binding the contract method 0xd4e2e579. // // Solidity: function get_id(string idStr) constant returns(int256) func (_Tls *TlsSession) GetId(idStr string) (*big.Int, error) { return _Tls.Contract.GetId(&_Tls.CallOpts, idStr) }
感觉可以改进一下?XD