Decentralised Art Server
High-performance C++ backend that exposes HTML interface and a secure REST API for managing Performative Transactions entities
 
Loading...
Searching...
No Matches
dcn::EVM Class Reference

#include <evm.hpp>

Public Member Functions

 EVM (asio::io_context &io_context, evmc_revision rev, std::filesystem::path solc_path)
 
 ~EVM ()=default
 
 EVM (const EVM &)=delete
 
EVMoperator= (const EVM &)=delete
 
 EVM (EVM &&)=delete
 
EVMoperator= (EVM &&)=delete
 
asio::awaitable< booladdAccount (evmc::address address, std::uint64_t initial_gas) noexcept
 
asio::awaitable< boolsetGas (evmc::address address, std::uint64_t gas) noexcept
 
asio::awaitable< boolcompile (std::filesystem::path code_path, std::filesystem::path out_dir, std::filesystem::path base_path={}, std::filesystem::path includes={}) const noexcept
 
asio::awaitable< std::expected< evmc::address, evmc_status_code > > deploy (std::istream &code_stream, evmc::address sender, std::vector< std::uint8_t > constructor_args, std::uint64_t gas_limit, std::uint64_t value) noexcept
 
asio::awaitable< std::expected< evmc::address, evmc_status_code > > deploy (std::filesystem::path code_path, evmc::address sender, std::vector< uint8_t > constructor_args, std::uint64_t gas_limit, std::uint64_t value) noexcept
 
asio::awaitable< std::expected< std::vector< std::uint8_t >, evmc_status_code > > execute (evmc::address sender, evmc::address recipient, std::vector< std::uint8_t > input_bytes, std::uint64_t gas_limit, std::uint64_t value) noexcept
 
evmc::address getRegistryAddress () const
 
evmc::address getRunnerAddress () const
 

Protected Member Functions

asio::awaitable< boolloadPT ()
 

Constructor & Destructor Documentation

◆ EVM() [1/3]

dcn::EVM::EVM ( asio::io_context &  io_context,
evmc_revision  rev,
std::filesystem::path  solc_path 
)

◆ ~EVM()

dcn::EVM::~EVM ( )
default

◆ EVM() [2/3]

dcn::EVM::EVM ( const EVM )
delete

◆ EVM() [3/3]

dcn::EVM::EVM ( EVM &&  )
delete

Member Function Documentation

◆ addAccount()

asio::awaitable< bool > dcn::EVM::addAccount ( evmc::address  address,
std::uint64_t  initial_gas 
)
noexcept

◆ compile()

asio::awaitable< bool > dcn::EVM::compile ( std::filesystem::path  code_path,
std::filesystem::path  out_dir,
std::filesystem::path  base_path = {},
std::filesystem::path  includes = {} 
) const
noexcept

◆ deploy() [1/2]

asio::awaitable< std::expected< evmc::address, evmc_status_code > > dcn::EVM::deploy ( std::filesystem::path  code_path,
evmc::address  sender,
std::vector< uint8_t constructor_args,
std::uint64_t  gas_limit,
std::uint64_t  value 
)
noexcept

◆ deploy() [2/2]

asio::awaitable< std::expected< evmc::address, evmc_status_code > > dcn::EVM::deploy ( std::istream &  code_stream,
evmc::address  sender,
std::vector< std::uint8_t >  constructor_args,
std::uint64_t  gas_limit,
std::uint64_t  value 
)
noexcept

◆ execute()

asio::awaitable< std::expected< std::vector< std::uint8_t >, evmc_status_code > > dcn::EVM::execute ( evmc::address  sender,
evmc::address  recipient,
std::vector< std::uint8_t >  input_bytes,
std::uint64_t  gas_limit,
std::uint64_t  value 
)
noexcept

◆ getRegistryAddress()

evmc::address dcn::EVM::getRegistryAddress ( ) const

◆ getRunnerAddress()

evmc::address dcn::EVM::getRunnerAddress ( ) const

◆ loadPT()

asio::awaitable< bool > dcn::EVM::loadPT ( )
protected

◆ operator=() [1/2]

EVM & dcn::EVM::operator= ( const EVM )
delete

◆ operator=() [2/2]

EVM & dcn::EVM::operator= ( EVM &&  )
delete

◆ setGas()

asio::awaitable< bool > dcn::EVM::setGas ( evmc::address  address,
std::uint64_t  gas 
)
noexcept

The documentation for this class was generated from the following files: