<commit_before>namespace BitProfile{


inline Contract::Contract(Provider &provider, const address_t &address) : 
    Base(provider, address),
    _observer(provider),
    _provider(provider)
{}


template<class Result>
Result Contract::call(const char *method)
{
    ContractResult result = Base::call(method);
    return cast(ResultTypeTag<Result>(), result);
}


template<class Result>
Result Contract::call(const char *method, const ContractArguments &args)
{
    ContractResult result = Base::call(method, args);
    return cast(ResultTypeTag<Result>(), result);
}


inline std::string Contract::cast(ResultTypeTag<std::string>, ContractResult &result)
{
    return result.toString();
}

inline uint256_t Contract::cast(ResultTypeTag<uint256_t>, ContractResult &result)
{
    return result.toUint();
}


bool Contract::isNull() const
{
    return !getAddress().size();
}


inline bool Contract::cast(ResultTypeTag<bool>, ContractResult &result)
{
    return result.toBool();
}

inline Provider & Contract::getProvider()
{
    return _provider;
}

template<class CheckCallback>
bool Contract::executeConfirm(const char *method, const CheckCallback &check)
{
    txid_t txid = execute(method);
    return _observer.watch(txid) && check();
}

template<class CheckCallback>
bool Contract::executeConfirm(const char *method, const ContractArguments &args, const CheckCallback &check)
{
    txid_t txid = execute(method, args);<commit_msg>default gas limit<commit_after>namespace BitProfile{


inline Contract::Contract(Provider &provider, const address_t &address) : 
    Base(provider, address),
    _observer(provider),
    _provider(provider)
{
    setGasLimit(uint256_t(4300000));
}


template<class Result>
Result Contract::call(const char *method)
{
    ContractResult result = Base::call(method);
    return cast(ResultTypeTag<Result>(), result);
}


template<class Result>
Result Contract::call(const char *method, const ContractArguments &args)
{
    ContractResult result = Base::call(method, args);
    return cast(ResultTypeTag<Result>(), result);
}


inline std::string Contract::cast(ResultTypeTag<std::string>, ContractResult &result)
{
    return result.toString();
}

inline uint256_t Contract::cast(ResultTypeTag<uint256_t>, ContractResult &result)
{
    return result.toUint();
}


inline bool Contract::isNull() const
{
    return !getAddress().size();
}


inline bool Contract::cast(ResultTypeTag<bool>, ContractResult &result)
{
    return result.toBool();
}

inline Provider & Contract::getProvider()
{
    return _provider;
}

template<class CheckCallback>
bool Contract::executeConfirm(const char *method, const CheckCallback &check)
{
    txid_t txid = execute(method);
    return _observer.watch(txid) && check();
}

template<class CheckCallback>
bool Contract::executeConfirm(const char *method, const ContractArguments &args, const CheckCallback &check)
{
    txid_t txid = execute(method, args);
{'fraction_non_alphanumeric': 0.12410256410256411, 'fraction_numerical': 0.007521367521367521, 'mean_word_length': 5.868544600938967, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1968116', 'n_tokens_mistral': 874, 'n_tokens_neox': 837, 'n_words': 207}