Closed hskang9 closed 1 year ago
I tried to remove unwrap()
as far as possible by aggregating both postres::Error
and TryFromIntError
, but they happen to collide on RowIter
type's map function.
So I was told by @joshuajbouw to overhaul the json encode/decode after adding this method as borsh, because it is inconsistent for admin methods to have it while all other methods use borsh encode/decode for now.
@joshuajbouw it is now used with borsh.
Resolve the conflicts.
Description
Aurora DAO requires an owner shift from the contract creator to Aurora DAO contract to execute its admin functions in the future. To achieve this, previous owner have to set the owner address from before to a new address that the previous owner sets.
set_owner
method checks whether the sender is marked as the owner of the engine contract's state.Then converts string input into AccountId.
Performance / NEAR gas cost considerations
It changes
owner
property in Aurora engine's contract state.Testing
Tests were done in https://github.com/hskang9/aurora-silo-tests/blob/main/src/test.rs#L156.
How should this be reviewed
I am concerned if converting a random string into NEAR account id is still safe.
Additional information