0.7.0

New list of operations

typedef fc::static_variant<
transfer_operation,
limit_order_create_operation,
limit_order_cancel_operation,
call_order_update_operation,
fill_order_operation, // VIRTUAL
account_create_operation,
account_update_operation,
account_whitelist_operation,
account_upgrade_operation,
account_transfer_operation,
asset_create_operation,
asset_update_operation,
asset_update_bitasset_operation,
asset_update_feed_producers_operation,
asset_issue_operation,
asset_reserve_operation,
asset_fund_fee_pool_operation,
asset_settle_operation,
asset_global_settle_operation,
asset_publish_feed_operation,
proposal_create_operation,
proposal_update_operation,
proposal_delete_operation,
withdraw_permission_create_operation,
withdraw_permission_update_operation,
withdraw_permission_claim_operation,
withdraw_permission_delete_operation,
committee_member_create_operation,
committee_member_update_operation,
committee_member_update_global_parameters_operation,
vesting_balance_create_operation,
vesting_balance_withdraw_operation,
custom_operation,
assert_operation,
balance_claim_operation,
override_transfer_operation,
asset_settle_cancel_operation, // VIRTUAL
asset_claim_fees_operation,
bid_collateral_operation,
execute_bid_operation, // VIRTUAL
create_contract_operation,
call_contract_operation,
contract_transfer_operation,
change_sidechain_config_operation, // Temporary operation for tests
account_address_create_operation,
transfer_to_address_operation,
generate_eth_address_operation,
create_eth_address_operation,
deposit_eth_operation,
withdraw_eth_operation,
approve_withdraw_eth_operation,
contract_fund_pool_operation,
contract_whitelist_operation,
sidechain_issue_operation, // VIRTUAL
sidechain_burn_operation // VIRTUAL
> operation;

New objects order

enum object_type
{
null_object_type,
base_object_type,
account_object_type,
asset_object_type,
force_settlement_object_type,
committee_member_object_type,
limit_order_object_type,
call_order_object_type,
custom_object_type,
proposal_object_type,
operation_history_object_type,
withdraw_permission_object_type,
vesting_balance_object_type,
balance_object_type,
contract_object_type,
contract_result_object_type,
block_result_object_type,
eth_address_object_type,
deposit_eth_object_type,
withdraw_eth_object_type,
OBJECT_TYPE_COUNT ///< Sentry value which contains the number of different object types
};
enum impl_object_type
{
impl_global_property_object_type,
impl_dynamic_global_property_object_type,
impl_reserved0_object_type, // formerly index_meta_object_type, TODO: delete me
impl_asset_dynamic_data_type,
impl_asset_bitasset_data_type,
impl_account_balance_object_type,
impl_account_statistics_object_type,
impl_transaction_object_type,
impl_block_summary_object_type,
impl_account_transaction_history_object_type,
impl_chain_property_object_type,
impl_budget_record_object_type,
impl_special_authority_object_type,
impl_buyback_object_type,
impl_collateral_bid_object_type,
impl_contract_balance_object_type,
impl_contract_history_object_type,
impl_contract_statistics_object_type,
impl_account_address_object_type,
impl_contract_pool_object_type
};

Private and public keys format

Slightly changed the format of the keys:

  • For public keys, the prefix has changed from DET to ECHO

  • Private keys no longer have a prefix

sidechain::config

Added field eth_update_add_method. New field order:

struct config
{
std::string eth_contract_address;
eth_method eth_committee_update_method;
eth_method eth_gen_address_method;
eth_method eth_withdraw_method;
eth_method eth_update_addr_method;
std::string eth_committee_updated_topic;
std::string eth_gen_address_topic;
std::string eth_deposit_topic;
std::string eth_withdraw_topic;
graphene::chain::asset_id_type ETH_asset_id;
}

account_object

  • Field ed_key renamed echorand_key.

  • Removed field memo_key

eth_address_object

  • Field acc_id renamed account

deposit_eth_object

  • Field acc_id renamed account

withdraw_eth_object

  • Field acc_id renamed account

asset_issue_operation

  • Removed field memo

transfer_operation

  • Removed field memo

override_transfer_operation

  • Removed field memo

withdraw_permission_claim_operation

  • Removed field memo

generate_eth_address_operation

  • Field acc_id renamed account

create_eth_address_operation

  • Field acc_id renamed account

withdraw_eth_operation

  • Field acc_id renamed account

registration_api

register_account

In the method register_account removed fields owner, memo.

database_api

get_required_fees

Changed the result returned get_required_fees for the operation call_contract_operation

struct fee_result
{
asset fee;
asset user_to_pay;
};

fee - total Commission for execution. user_to_pay commission is paid by the user.

In the transaction, as before, you need to set fee. Field user_to_pay - information.

Changes due to the fact that added new functionality pool contract: https://echo-dev.io/developers/smart-contracts/fee-pool/.

Added new methods:

Sidechain

/** Returns information about generated eth address, if then exist and approved, for the given account id.
*
* @param account the id of the account to provide information about
* @returns the public eth address data stored in the blockchain
*/
optional<eth_address_object> get_eth_address(const account_id_type& account) const;
/** Returns all approved deposits, for the given account id.
*
* @param account the id of the account to provide information about
* @returns the all public deposits data stored in the blockchain
*/
std::vector<deposit_eth_object> get_account_deposits(const account_id_type& account) const;
/** Returns all approved withdrawals, for the given account id.
*
* @param account the id of the account to provide information about
* @returns the all public withdrawals data stored in the blockchain
*/
std::vector<withdraw_eth_object> get_account_withdrawals(const account_id_type& account) const;

Added operations

sidechain_issue_operation

Virtual operation, which reports that the money entered with the help of sidechain

struct sidechain_issue_operation {
asset fee;
asset value;
account_id_type account;
deposit_eth_id_type deposit_id;
}

sidechain_burn_operation

Virtual operation, which reports that the conclusion was successful and funds burned(withdrawn)

struct sidechain_burn_operation {
asset fee;
asset value;
account_id_type account;
withdraw_eth_id_type withdraw_id;
}

New functionality

Contract pool

https://echo-dev.io/developers/smart-contracts/fee-pool/

database_api

Added methods in database_api to work with the pool contract

/**
* @brief Get an contract's pool balance in default asset
* @param id ID of the contract to get balances for
* @return Balances of the contract
*/
asset get_contract_pool_balance(contract_id_type id) const;
/**
* @brief Get an contract's whitelist and blacklist
* @param id ID of the contract to get balances for
* @return struct contract_pool_whitelist which consist of whitelist blacklist
*/
graphene::chain::contract_pool_whitelist get_contract_pool_whitelist(contract_id_type id) const;

New operations

contract_fund_pool_operation

The operation is required to be able to replenish the contract pool, with which you can pay for user calls to the methods of this contract.

struct contract_fund_pool_operation
{
account_id_type sender;
contract_id_type callee;
asset fee;
asset value;
}

contract_whitelist_operation

The operation is required to manage the blacklist and whitelist pool of the contract.

struct contract_whitelist_operation
{
account_id_type registrar;
contract_id_type contract_to_modify;
asset fee;
set<account_id_type> add_to_whitelist;
set<account_id_type> remove_from_whitelist;
set<account_id_type> add_to_blacklist;
set<account_id_type> remove_from_blacklist;
}