0.8.0

CORE precision

Precision asset ECHO now 8

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
register_erc20_token_operation,
58
deposit_erc20_token_operation,
59
withdraw_erc20_token_operation,
60
approve_erc20_token_withdraw_operation,
61
contract_update_operation
62
> 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
erc20_token_object_type,
24
deposit_erc20_token_object_type,
25
withdraw_erc20_token_object_type,
26
OBJECT_TYPE_COUNT ///< Sentry value which contains the number of different object types
27
};
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,
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
impl_malicious_committeemen_object_type
24
};
Copied!

extensions

Many objects lacked the required extensions field, which is of type flat_set<static_variant<void_t>>. Added last field in the following operations and objects:
Operations:
balance_claim_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, create_contract_operation, call_contract_operation, contract_fund_pool_operation, contract_whitelist_operation, custom_operation, fill_order_operation, execute_bid_operation, change_sidechain_config_operation, sidechain_issue_operation, sidechain_burn_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation
Objects:
account_address_object, account_statistics_object, account_balance_object, account_object, contract_balance_object, contract_object, contract_statistics_object, contract_result_object, block_result_object, eth_address_object, deposit_eth_object, withdraw_eth_object, asset_dynamic_data_object, asset_object, asset_bitasset_data_object, limit_order_object, call_order_object, force_settlement_object, collateral_bid_object, committee_member_object, proposal_object, operation_history_object, account_transaction_history_object, contract_history_object, withdraw_permission_object, vesting_balance_object, balance_object, dynamic_global_property_object, contract_pool_object, transaction_object, block_summary_object, chain_property_object, budget_record_object, special_authority_object, buyback_object
As an example of use extensions - asset_create_operation.

price_per_kbyte

Of options fee in operations transfer_operation, override_transfer_operation, withdraw_permission_claim_operation field is removed price_per_kbyte.

chain_parameters

Field is added to the sidechain::erc20_config erc20_config after sidechain_config.
1
struct erc20_config
2
{
3
std::string contract_code;
4
uint64_t create_token_fee;
5
std::string transfer_topic;
6
eth_method check_balance_method;
7
eth_method burn_method;
8
eth_method issue_method;
9
};
Copied!

contract_object

Moved field type
1
class contract_object
2
{
3
public:
4
echo::vm::vm_type type;
5
bool destroyed = false;
6
contract_statistics_id_type statistics;
7
fc::optional<asset_id_type> supported_asset_id;
8
fc::optional<account_id_type> owner;
9
10
extensions_type extensions;
11
}
Copied!

contract_fund_pool_operation

Moved field fee
1
struct contract_fund_pool_operation
2
{
3
asset fee;
4
account_id_type sender;
5
contract_id_type contract;
6
asset value;
7
8
extensions_type extensions;
9
}
Copied!

contract_whitelist_operation

Moved field fee
1
struct contract_whitelist_operation
2
{
3
asset fee;
4
account_id_type sender;
5
contract_id_type contract;
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
12
extensions_type extensions;
13
}
Copied!

contract_update_operation

Added a new operation to update the contract owner.
1
struct contract_update_operation : public base_operation
2
{
3
asset fee;
4
account_id_type sender;
5
contract_id_type contract;
6
7
fc::optional<account_id_type> new_owner;
8
9
extensions_type extensions;
10
};
Copied!

account_statistics_object

Added fields generated_eth_address, committeeman_rating. New field order
1
class account_statistics_object
2
{
3
account_id_type owner;
4
account_transaction_history_id_type most_recent_op;
5
uint32_t total_ops = 0;
6
uint32_t removed_ops = 0;
7
uint32_t total_blocks = 0;
8
share_type total_core_in_orders;
9
share_type lifetime_fees_paid;
10
share_type pending_fees;
11
share_type pending_vested_fees;
12
bool generated_eth_address = false;
13
int64_t committeeman_rating = 0;
14
extensions_type extensions;
15
};
Copied!

account_address_create_operation

Changed parameters fee:
1
struct fee_parameters_type
2
{
3
uint64_t fee = 5*ECHO_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account
4
uint32_t price_per_kbyte = ECHO_BLOCKCHAIN_PRECISION;
5
};
Copied!

committee_member_create_operation

Field eth_address now a set of bytes serialized as vector<char> of size 20.

committee_member_update_operation

Field new_eth_address now a set of bytes serialized as vector<char> of size 20.

withdraw_eth_operation

Field eth_addr now a set of bytes serialized as vector<char> of size 20.

register_erc20_token_operation

Used to register a token in the sidechain.
1
struct register_erc20_token_operation
2
{
3
asset fee;
4
5
account_id_type account;
6
eth_address_type eth_addr; // address of the contract in ethereum
7
8
extensions_type extensions;
9
};
Copied!

deposit_erc20_token_operation

An internal operation by which committee members confirm the entry of tokens.
1
struct deposit_erc20_token_operation
2
asset fee;
3
4
account_id_type committee_member_id;
5
std::vector<account_id_type> malicious_committeemen;
6
7
account_id_type account;
8
eth_address_type erc20_token_addr; // address of the contract in ethereum
9
std::string value;
10
sha256 transaction_hash;
11
12
extensions_type extensions;
13
};
Copied!

withdraw_erc20_token_operation

Executed by the user and initiates the withdrawal of the token from the Echo network to the specified address.
1
struct withdraw_erc20_token_operation
2
{
3
asset fee;
4
5
account_id_type account;
6
eth_address_type to; // withdrawal address
7
erc20_token_id_type erc20_token; // contract id of the token
8
std::string value;
9
10
extensions_type extensions;
11
};
Copied!

approve_erc20_token_withdraw_operation

An internal operation by which committee members confirm the removal of tokens.
1
struct approve_erc20_token_withdraw_operation
2
{
3
asset fee;
4
5
account_id_type committee_member_id;
6
eth_address_type to;
7
std::string value;
8
sha256 transaction_hash;
9
10
extensions_type extensions;
11
};
Copied!

malicious_committeemen_object

1
class malicious_committeemen_object
2
{
3
object_id_type related;
4
std::map<std::vector<account_id_type>, uint16_t> sets_of_malicious;
5
};
Copied!

erc20_token_object

1
class erc20_token_object : public abstract_object<erc20_token_object>
2
{
3
account_id_type owner;
4
eth_address_type eth_addr;
5
contract_id_type contract;
6
};
Copied!

deposit_erc20_token_object

1
class deposit_erc20_token_object : public abstract_object<deposit_erc20_token_object>
2
{
3
account_id_type account;
4
eth_address_type erc20_addr;
5
std::string value;
6
sha256 transaction_hash;
7
8
bool is_approved = false;
9
set<account_id_type> approves;
10
};
Copied!

withdraw_erc20_token_object

1
class withdraw_erc20_token_object : public abstract_object<withdraw_erc20_token_object>
2
{
3
uint64_t withdraw_id = 0;
4
account_id_type account;
5
eth_address_type to;
6
erc20_token_id_type erc20_token;
7
std::string value;
8
sha256 transaction_hash;
9
10
bool is_approved = false;
11
set<account_id_type> approves;
12
};
Copied!

sidechain::config

eth_contract_address - now is a set of bytes with a length of 20.
New field:
1
eth_method eth_withdraw_token_method;
2
eth_method eth_collect_tokens_method;
3
std::string erc20_deposit_topic;
4
sidechain_fines fines;
5
uint32_t waiting_blocks;
Copied!
1
struct sidechain_fines
2
{
3
int64_t generate_eth_address;
4
};
Copied!
1
struct config
2
{
3
eth_address_type 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
eth_method eth_withdraw_token_method;
9
eth_method eth_collect_tokens_method;
10
std::string eth_committee_updated_topic;
11
std::string eth_gen_address_topic;
12
std::string eth_deposit_topic;
13
std::string eth_withdraw_topic;
14
std::string erc20_deposit_topic;
15
graphene::chain::asset_id_type ETH_asset_id;
16
sidechain_fines fines;
17
uint32_t waiting_blocks;
18
}
Copied!
Last modified 2yr ago