This PR refactors the access_keys logic to be driven from StateChanges rather than ExecutionOutcomes, allowing us to remove the logic which indirectly creates an access key on every transfer to an implicit account. This means access keys will only be written when the implicit account is first created, and ignore subsequent transfers. Resolves https://github.com/near/near-indexer-for-explorer/issues/304.
Test plan:
[x] verified access key updates still function as expected by running the StateChange/ExecutionOutcome logic simultaneously and comparing the proposed DB updates.
[x] verified that access keys for implicit accounts are not overwritten on subsequent transfers (specifically deleted_by_receipt_id and created_by_receipt_id)
This PR refactors the
access_keys
logic to be driven fromStateChanges
rather thanExecutionOutcomes
, allowing us to remove the logic which indirectly creates an access key on every transfer to an implicit account. This means access keys will only be written when the implicit account is first created, and ignore subsequent transfers. Resolves https://github.com/near/near-indexer-for-explorer/issues/304.Test plan:
StateChange
/ExecutionOutcome
logic simultaneously and comparing the proposed DB updates.deleted_by_receipt_id
andcreated_by_receipt_id
)