Skip to content

Commit 5f51508

Browse files
SunMi LeeXiao Li
SunMi Lee
authored and
Xiao Li
committed
Update diem ID to work with move resource name changes
1 parent b390850 commit 5f51508

18 files changed

+655
-350
lines changed

diem

Submodule diem updated 1501 files

src/diem/jsonrpc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
EVENT_DATA_BASE_URL_ROTATION,
9494
EVENT_DATA_CREATE_ACCOUNT,
9595
EVENT_DATA_ADMIN_TRANSACTION,
96-
EVENT_DATA_DIEM_ID_DOMAIN,
96+
EVENT_DATA_VASP_DOMAIN,
9797
# VMStatus#type field values
9898
VM_STATUS_EXECUTED,
9999
VM_STATUS_OUT_OF_GAS,

src/diem/jsonrpc/async_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ async def get_account_state_with_proof(
376376
"get_account_state_with_proof", params, _parse_obj(lambda: rpc.AccountStateWithProof())
377377
)
378378

379-
async def get_diem_id_domain_map(self, batch_size: int = 100) -> typing.Dict[str, str]:
379+
async def get_vasp_domain_map(self, batch_size: int = 100) -> typing.Dict[str, str]:
380380
domain_map = {}
381381
event_index = 0
382382
tc_account = await self.must_get_account(TREASURY_ADDRESS)
383-
event_stream_key = tc_account.role.diem_id_domain_events_key
383+
event_stream_key = tc_account.role.vasp_domain_events_key
384384
while True:
385385
events = await self.get_events(event_stream_key, event_index, batch_size)
386386
for event in events:
@@ -395,7 +395,7 @@ async def get_diem_id_domain_map(self, batch_size: int = 100) -> typing.Dict[str
395395

396396
async def support_diem_id(self) -> bool:
397397
tc_account = await self.must_get_account(TREASURY_ADDRESS)
398-
return bool(tc_account.role.diem_id_domain_events_key)
398+
return bool(tc_account.role.vasp_domain_events_key)
399399

400400
async def submit(
401401
self,

src/diem/jsonrpc/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,11 @@ def get_account_state_with_proof(
382382
params = [address, version, ledger_version]
383383
return self.execute("get_account_state_with_proof", params, _parse_obj(lambda: rpc.AccountStateWithProof()))
384384

385-
def get_diem_id_domain_map(self, batch_size: int = 100) -> typing.Dict[str, str]:
385+
def get_vasp_domain_map(self, batch_size: int = 100) -> typing.Dict[str, str]:
386386
domain_map = {}
387387
event_index = 0
388388
tc_account = self.must_get_account(utils.account_address(TREASURY_ADDRESS))
389-
event_stream_key = tc_account.role.diem_id_domain_events_key
389+
event_stream_key = tc_account.role.vasp_domain_events_key
390390
while True:
391391
events = self.get_events(event_stream_key, event_index, batch_size)
392392
for event in events:
@@ -401,7 +401,7 @@ def get_diem_id_domain_map(self, batch_size: int = 100) -> typing.Dict[str, str]
401401

402402
def support_diem_id(self) -> bool:
403403
tc_account = self.must_get_account(TREASURY_ADDRESS)
404-
return bool(tc_account.role.diem_id_domain_events_key)
404+
return bool(tc_account.role.vasp_domain_events_key)
405405

406406
def submit(
407407
self,

src/diem/jsonrpc/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
EVENT_DATA_BASE_URL_ROTATION: str = "baseurlrotation"
4141
EVENT_DATA_CREATE_ACCOUNT: str = "createaccount"
4242
EVENT_DATA_ADMIN_TRANSACTION: str = "admintransaction"
43-
EVENT_DATA_DIEM_ID_DOMAIN: str = "diemiddomain"
43+
EVENT_DATA_VASP_DOMAIN: str = "vaspdomain"
4444

4545

4646
# VMStatus#type field values

src/diem/jsonrpc/jsonrpc_pb2.py

Lines changed: 165 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/diem/jsonrpc/jsonrpc_pb2.pyi

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class AccountRole(google___protobuf___message___Message):
124124
base_url_rotation_events_key: typing___Text = ...
125125
num_children: builtin___int = ...
126126
received_mint_events_key: typing___Text = ...
127-
diem_id_domains: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text] = ...
128-
diem_id_domain_events_key: typing___Text = ...
127+
vasp_domains: google___protobuf___internal___containers___RepeatedScalarFieldContainer[typing___Text] = ...
128+
vasp_domain_events_key: typing___Text = ...
129129
@property
130130
def preburn_balances(
131131
self,
@@ -149,8 +149,8 @@ class AccountRole(google___protobuf___message___Message):
149149
received_mint_events_key: typing___Optional[typing___Text] = None,
150150
preburn_balances: typing___Optional[typing___Iterable[type___Amount]] = None,
151151
preburn_queues: typing___Optional[typing___Iterable[type___PreburnQueue]] = None,
152-
diem_id_domains: typing___Optional[typing___Iterable[typing___Text]] = None,
153-
diem_id_domain_events_key: typing___Optional[typing___Text] = None,
152+
vasp_domains: typing___Optional[typing___Iterable[typing___Text]] = None,
153+
vasp_domain_events_key: typing___Optional[typing___Text] = None,
154154
) -> None: ...
155155
def ClearField(
156156
self,
@@ -163,10 +163,6 @@ class AccountRole(google___protobuf___message___Message):
163163
b"compliance_key",
164164
"compliance_key_rotation_events_key",
165165
b"compliance_key_rotation_events_key",
166-
"diem_id_domain_events_key",
167-
b"diem_id_domain_events_key",
168-
"diem_id_domains",
169-
b"diem_id_domains",
170166
"expiration_time",
171167
b"expiration_time",
172168
"human_name",
@@ -183,6 +179,10 @@ class AccountRole(google___protobuf___message___Message):
183179
b"received_mint_events_key",
184180
"type",
185181
b"type",
182+
"vasp_domain_events_key",
183+
b"vasp_domain_events_key",
184+
"vasp_domains",
185+
b"vasp_domains",
186186
],
187187
) -> None: ...
188188

@@ -826,3 +826,58 @@ class AccumulatorConsistencyProof(google___protobuf___message___Message):
826826
) -> None: ...
827827

828828
type___AccumulatorConsistencyProof = AccumulatorConsistencyProof
829+
830+
class AccountTransactionsWithProof(google___protobuf___message___Message):
831+
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
832+
serialized_txns_with_proofs: google___protobuf___internal___containers___RepeatedScalarFieldContainer[
833+
typing___Text
834+
] = ...
835+
def __init__(
836+
self,
837+
*,
838+
serialized_txns_with_proofs: typing___Optional[typing___Iterable[typing___Text]] = None,
839+
) -> None: ...
840+
def ClearField(
841+
self, field_name: typing_extensions___Literal["serialized_txns_with_proofs", b"serialized_txns_with_proofs"]
842+
) -> None: ...
843+
844+
type___AccountTransactionsWithProof = AccountTransactionsWithProof
845+
846+
class EventWithProof(google___protobuf___message___Message):
847+
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
848+
event_with_proof: typing___Text = ...
849+
def __init__(
850+
self,
851+
*,
852+
event_with_proof: typing___Optional[typing___Text] = None,
853+
) -> None: ...
854+
def ClearField(self, field_name: typing_extensions___Literal["event_with_proof", b"event_with_proof"]) -> None: ...
855+
856+
type___EventWithProof = EventWithProof
857+
858+
class EventByVersionWithProof(google___protobuf___message___Message):
859+
DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
860+
@property
861+
def lower_bound_incl(self) -> type___EventWithProof: ...
862+
@property
863+
def upper_bound_excl(self) -> type___EventWithProof: ...
864+
def __init__(
865+
self,
866+
*,
867+
lower_bound_incl: typing___Optional[type___EventWithProof] = None,
868+
upper_bound_excl: typing___Optional[type___EventWithProof] = None,
869+
) -> None: ...
870+
def HasField(
871+
self,
872+
field_name: typing_extensions___Literal[
873+
"lower_bound_incl", b"lower_bound_incl", "upper_bound_excl", b"upper_bound_excl"
874+
],
875+
) -> builtin___bool: ...
876+
def ClearField(
877+
self,
878+
field_name: typing_extensions___Literal[
879+
"lower_bound_incl", b"lower_bound_incl", "upper_bound_excl", b"upper_bound_excl"
880+
],
881+
) -> None: ...
882+
883+
type___EventByVersionWithProof = EventByVersionWithProof

0 commit comments

Comments
 (0)