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::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< bool > addAccount (Address address, std::uint64_t initial_gas) noexcept
 
asio::awaitable< bool > setGas (Address address, std::uint64_t gas) noexcept
 
asio::awaitable< bool > compile (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< Address, DeployError > > deploy (std::istream &code_stream, Address sender, std::vector< std::uint8_t > constructor_args, std::uint64_t gas_limit, std::uint64_t value) noexcept
 
asio::awaitable< std::expected< Address, DeployError > > deploy (std::filesystem::path code_path, 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 >, ExecuteError > > execute (Address sender, Address recipient, std::vector< std::uint8_t > input_bytes, std::uint64_t gas_limit, std::uint64_t value) noexcept
 
Address getRegistryAddress () const
 
Address getRunnerAddress () const
 

Protected Member Functions

asio::awaitable< bool > loadPT ()
 

Constructor & Destructor Documentation

◆ EVM() [1/3]

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

◆ ~EVM()

dcn::evm::EVM::~EVM ( )
default

◆ EVM() [2/3]

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

◆ EVM() [3/3]

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

Member Function Documentation

◆ addAccount()

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

◆ compile()

asio::awaitable< bool > dcn::evm::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< Address, DeployError > > dcn::evm::EVM::deploy ( std::filesystem::path  code_path,
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< Address, DeployError > > dcn::evm::EVM::deploy ( std::istream &  code_stream,
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 >, ExecuteError > > dcn::evm::EVM::execute ( Address  sender,
Address  recipient,
std::vector< std::uint8_t >  input_bytes,
std::uint64_t  gas_limit,
std::uint64_t  value 
)
noexcept

◆ getRegistryAddress()

Address dcn::evm::EVM::getRegistryAddress ( ) const

◆ getRunnerAddress()

Address dcn::evm::EVM::getRunnerAddress ( ) const

◆ loadPT()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setGas()

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

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