Skip to content

Commit

Permalink
[ECHOT-303] Up library patch version >> 0.1.53: Update to 0.15.0-rc.0…
Browse files Browse the repository at this point in the history
… node version (#5)

* Add 'get_evm_addresses' db api method

* Add 'evm_address_register' operation, update operations and objects orders

* Update
  • Loading branch information
Eugene Vasilev authored Jan 16, 2020
1 parent a3ef314 commit 77b48bd
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions echopy/echoapi/ws_api/database_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ def get_account_by_address(self, address):
[address]
)

def get_evm_addresses(self, account_id):
return self.db.rpcexec(
'get_evm_addresses',
[account_id]
)

def get_account_count(self):
return self.db.rpcexec(
'get_account_count',
Expand Down
1 change: 1 addition & 0 deletions echopy/echobase/config/object_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ def __init__(self):
self.BTC_DEPOSIT = 21
self.BTC_WITHDRAW = 22
self.BTC_AGGREGATING = 23
self.EVM_ADDRESS = 24
1 change: 1 addition & 0 deletions echopy/echobase/config/operations_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ def __init__(self):
self.SIDECHAIN_BTC_AGGREGATE = 62
self.SIDECHAIN_BTC_APPROVE_AGGREGATE = 63
self.BLOCK_REWARD = 64
self.EVM_ADDRESS_REGISTER = 65
1 change: 1 addition & 0 deletions echopy/echobase/objecttypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
object_type["btc_deposit"] = 21
object_type["btc_withdraw"] = 22
object_type["btc_aggregating"] = 23
object_type["evm_address"] = 24
3 changes: 2 additions & 1 deletion echopy/echobase/operationids.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"sidechain_btc_withdraw",
"sidechain_btc_aggregate",
"sidechain_btc_approve_aggregate",
"block_reward"
"block_reward",
"evm_address_register"
]
operations = {o: ops.index(o) for o in ops}
12 changes: 12 additions & 0 deletions echopy/echobase/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,4 +766,16 @@ def detail(self, *args, **kwargs):
return result


class EvmAddressRegister(EchoObject):
def detail(self, *args, **kwargs):
result = OrderedDict(
[
("owner", ObjectId(kwargs["owner"], "account")),
("evm_address", Bytes(kwargs["evm_address"])),
("extensions", Set([])),
]
)
self.add_fee(result, kwargs)


fill_classmaps()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

VERSION = "0.1.52"
VERSION = "0.1.53"
packages = find_packages()
packages.remove('test')

Expand Down

0 comments on commit 77b48bd

Please sign in to comment.