0.7.0

New list of operations

1
typedef fc::static_variant<
2
transfer_operation,
3
limit_order_create_operation,
4
limit_order_cancel_operation,
5
call_order_update_operation,
6
fill_order_operation, // VIRTUAL
7
account_create_operation,
8
account_update_operation,
9
account_whitelist_operation,
10
account_upgrade_operation,
11
account_transfer_operation,
12
asset_create_operation,
13
asset_update_operation,
14
asset_update_bitasset_operation,
15
asset_update_feed_producers_operation,
16
asset_issue_operation,
17
asset_reserve_operation,
18
asset_fund_fee_pool_operation,
19
asset_settle_operation,
20
asset_global_settle_operation,
21
asset_publish_feed_operation,
22
proposal_create_operation,
23
proposal_update_operation,
24
proposal_delete_operation,
25
withdraw_permission_create_operation,
26
withdraw_permission_update_operation,
27
withdraw_permission_claim_operation,
28
withdraw_permission_delete_operation,
29
committee_member_create_operation,
30
committee_member_update_operation,
31
committee_member_update_global_parameters_operation,
32
vesting_balance_create_operation,
33
vesting_balance_withdraw_operation,
34
custom_operation,
35
assert_operation,
36
balance_claim_operation,
37
override_transfer_operation,
38
asset_settle_cancel_operation, // VIRTUAL
39
asset_claim_fees_operation,
40
bid_collateral_operation,
41
execute_bid_operation, // VIRTUAL
42
create_contract_operation,
43
call_contract_operation,
44
contract_transfer_operation,
45
change_sidechain_config_operation, // Temporary operation for tests
46
account_address_create_operation,
47
transfer_to_address_operation,
48
generate_eth_address_operation,
49
create_eth_address_operation,
50
deposit_eth_operation,
51
withdraw_eth_operation,
52
approve_withdraw_eth_operation,
53
contract_fund_pool_operation,
54
contract_whitelist_operation,
55
sidechain_issue_operation, // VIRTUAL
56
sidechain_burn_operation // VIRTUAL
57
> operation;
Copied!

New objects order

1
enum object_type
2
{
3
null_object_type,
4
base_object_type,
5
account_object_type,
6
asset_object_type,
7
force_settlement_object_type,
8
committee_member_object_type,
9
limit_order_object_type,
10
call_order_object_type,
11
custom_object_type,
12
proposal_object_type,
13
operation_history_object_type,
14
withdraw_permission_object_type,
15
vesting_balance_object_type,
16
balance_object_type,
17
contract_object_type,
18
contract_result_object_type,
19
block_result_object_type,
20
eth_address_object_type,
21
deposit_eth_object_type,
22
withdraw_eth_object_type,
23
OBJECT_TYPE_COUNT ///< Sentry value which contains the number of different object types
24
};
Copied!
1
enum impl_object_type
2
{
3
impl_global_property_object_type,
4
impl_dynamic_global_property_object_type,
5
impl_reserved0_object_type, // formerly index_meta_object_type, TODO: delete me
6
impl_asset_dynamic_data_type,
7
impl_asset_bitasset_data_type,
8
impl_account_balance_object_type,
9
impl_account_statistics_object_type,
10
impl_transaction_object_type,
11
impl_block_summary_object_type,
12
impl_account_transaction_history_object_type,
13
impl_chain_property_object_type,
14
impl_budget_record_object_type,
15
impl_special_authority_object_type,
16
impl_buyback_object_type,
17
impl_collateral_bid_object_type,
18
impl_contract_balance_object_type,
19
impl_contract_history_object_type,
20
impl_contract_statistics_object_type,
21
impl_account_address_object_type,
22
impl_contract_pool_object_type
23
};
Copied!

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:
1
struct config
2
{
3
std::string eth_contract_address;
4
eth_method eth_committee_update_method;
5
eth_method eth_gen_address_method;
6
eth_method eth_withdraw_method;
7
eth_method eth_update_addr_method;
8
std::string eth_committee_updated_topic;
9
std::string eth_gen_address_topic;
10
std::string eth_deposit_topic;
11
std::string eth_withdraw_topic;
12
graphene::chain::asset_id_type ETH_asset_id;
13
}
Copied!

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
1
struct fee_result
2
{
3
asset fee;
4
asset user_to_pay;
5
};
Copied!
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

1
/** Returns information about generated eth address, if then exist and approved, for the given account id.
2
*
3
* @param account the id of the account to provide information about
4
* @returns the public eth address data stored in the blockchain
5
*/
6
optional<eth_address_object> get_eth_address(const account_id_type& account) const;
7
8
/** Returns all approved deposits, for the given account id.
9
*
10
* @param account the id of the account to provide information about
11
* @returns the all public deposits data stored in the blockchain
12
*/
13
std::vector<deposit_eth_object> get_account_deposits(const account_id_type& account) const;
14
15
/** Returns all approved withdrawals, for the given account id.
16
*
17
* @param account the id of the account to provide information about
18
* @returns the all public withdrawals data stored in the blockchain
19
*/
20
std::vector<withdraw_eth_object> get_account_withdrawals(const account_id_type& account) const;
Copied!

Added operations

sidechain_issue_operation

Virtual operation, which reports that the money entered with the help of sidechain
1
struct sidechain_issue_operation {
2
asset fee;
3
4
asset value;
5
account_id_type account;
6
deposit_eth_id_type deposit_id;
7
}
Copied!

sidechain_burn_operation

Virtual operation, which reports that the conclusion was successful and funds burned(withdrawn)
1
struct sidechain_burn_operation {
2
asset fee;
3
4
asset value;
5
account_id_type account;
6
withdraw_eth_id_type withdraw_id;
7
}
Copied!

New functionality

Contract pool

database_api

Added methods in database_api to work with the pool contract
1
/**
2
* @brief Get an contract's pool balance in default asset
3
* @param id ID of the contract to get balances for
4
* @return Balances of the contract
5
*/
6
asset get_contract_pool_balance(contract_id_type id) const;
7
8
/**
9
* @brief Get an contract's whitelist and blacklist
10
* @param id ID of the contract to get balances for
11
* @return struct contract_pool_whitelist which consist of whitelist blacklist
12
*/
13
graphene::chain::contract_pool_whitelist get_contract_pool_whitelist(contract_id_type id) const;
Copied!

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.
1
struct contract_fund_pool_operation
2
{
3
account_id_type sender;
4
contract_id_type callee;
5
asset fee;
6
asset value;
7
}
Copied!

contract_whitelist_operation

The operation is required to manage the blacklist and whitelist pool of the contract.
1
struct contract_whitelist_operation
2
{
3
account_id_type registrar;
4
contract_id_type contract_to_modify;
5
asset fee;
6
7
set<account_id_type> add_to_whitelist;
8
set<account_id_type> remove_from_whitelist;
9
set<account_id_type> add_to_blacklist;
10
set<account_id_type> remove_from_blacklist;
11
}
Copied!
Last modified 2yr ago