// GetTokenIcoOffer makes an RPC call to get a token (identified by contract address) unitsOneEthCanBuy.
// token: address of the contract that defines the token. It must be ERC20 compliant
// Executes:
//  curl -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0xa34de7bd2b4270c0b12d5fd7a0c219a4d68d732f","data":"0x65f2bc2e"},"latest"],"id":4}' http://localhost:8545
GetTokenIcoOffer makes an RPC call to get a token (identified by contract address) unitsOneEthCanBuy.
token: address of the contract that defines the token.
// GetTokenIcoOffer makes an RPC call to get a token ( identified by contract address ) unitsOneEthCanBuy . // token : address of the contract that defines the token . It must be ERC20 compliant // Executes : // curl - X POST -- data ' { " jsonrpc " : " 2 . 0 " " method " : " eth_call " " params " : [ { " to " : " 0xa34de7bd2b4270c0b12d5fd7a0c219a4d68d732f " " data " : " 0x65f2bc2e " } " latest " ] " id " : 4 } ' http : // localhost : 8545
func (c *EthCli) GetTokenIcoOffer(token string) (ico uint64, err error) {
	var response interface{}
	if token == "" {
		return 0, nil
	}
	if len(token) != 42 {
		return 0, ErrBadToken
	}
	if err = c.Call("eth_call", []interface{}{map[string]interface{}{"to": token, "data": "0x65f2bc2e"}, "latest"}, &response); err != nil || response.(string) == "0x" {
		return 0, err
	}
	return strconv.ParseUint(response.(string), 0, 64)
}
func ( c * EthCli ) GetTokenIcoOffer ( token string ) ( ico uint64 , err error ) { var response interface { } if token == " " { return 0 , nil } if len ( token ) != 42 { return 0 , ErrBadToken } if err = c . Call ( " " , [ ] interface { } { map [ string ] interface { } { " " : token , " " : " " } , " " } , & response ) ; err != nil || response . ( string ) == " " { return 0 , err } return strconv . ParseUint ( response . ( string ) , 0 , 64 ) }
GetTokenIcoOffer makes an RPC call to get a token (identified by contract address) unitsOneEthCanBuy.
GetTokenIcoOffer makes an RPC call to get a token ( identified by contract address ) unitsOneEthCanBuy .