跳到主要内容

libraries/eosiolib/contracts/eosio/system.hpp

More...

Namespaces

Name
eosio
eosio::internal_use_do_not_use

Detailed Description

Copyright: defined in eos/LICENSE

Source code


#pragma once
#include "../../core/eosio/time.hpp"
#include "../../core/eosio/check.hpp"
#include "../../core/eosio/fixed_bytes.hpp"
#include "../../core/eosio/name.hpp"

namespace eosio {
namespace internal_use_do_not_use {
extern "C" {
__attribute__((eosio_wasm_import, noreturn))
void eosio_exit( int32_t code );

struct __attribute__((aligned (16))) capi_checksum256 {
uint8_t hash[32];
};

__attribute__((eosio_wasm_import))
bool is_feature_activated( const capi_checksum256* feature_digest );

__attribute__((eosio_wasm_import))
uint64_t get_sender();

__attribute__((eosio_wasm_import))
uint32_t get_block_num();

}
}

inline void eosio_exit( int32_t code ) {
internal_use_do_not_use::eosio_exit(code);
}

time_point current_time_point();

block_timestamp current_block_time();

using block_num_t = uint32_t;

inline block_num_t current_block_number() {
return internal_use_do_not_use::get_block_num();
}

inline bool is_feature_activated( const checksum256& feature_digest ) {
auto feature_digest_data = feature_digest.extract_as_byte_array();
return internal_use_do_not_use::is_feature_activated(
reinterpret_cast<const internal_use_do_not_use::capi_checksum256*>( feature_digest_data.data() )
);
}

inline name get_sender() {
return name( internal_use_do_not_use::get_sender() );
}
}

Updated on 2022-12-05 at 15:38:08 +0000