wasm contain from_iso_string of time_point display "unresolvable"
I'm trying to send a time string as input of an action. And I used from_iso_string in "eosiolib/time.hpp". The compile succeded. But faild on the setting contract step. The error message is:
Exception Details: 3070000 wasm_exception: WASM Exception env._ZN5eosio10time_point15from_iso_stringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE unresolveable {"module":"env","export":"_ZN5eosio10time_point15from_iso_stringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE"}
My code is:
#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
#include <eosiolib/time.hpp>
#include
using namespace eosio;
class try_time : public eosio::contract{ public: try_time(account_name self): eosio::contract(self){}
///@abi action
void show(const std::string& time_str)
{
const time_point& current_time = time_point::from_iso_string(time_str);
print(current_time.elapsed._count);
}
}; EOSIO_ABI(try_time, (show))
Well acutally i cant find the implementation of from_iso_string in the repository.
eosio::time_point is a modified version of fc::time_point. The declaration for from_iso_string was accidentally left in and should be removed.
And which function shall I use to translate a string into a time_point struct? I tried fc::time_point and it generated an compile error: /usr/local/eosio/include/libc++/upstream/include/float.h:69:15: fatal error: 'float.h' file not found #include_next <float.h>
Actions contain binary data to reduce the need for contracts to parse text.
OK I get that. Thanks.
from_iso_string still left in eosio::time_point in both eos and eosio.wasmsdk reop.
@spartucus Can you please create an issue in eosio.wasmske repo if you have not already. Thanks.