22pragma solidity ^ 0.8.20 ;
33
44import {TxAuthManagerBase} from "./TxAuthManagerBase.sol " ;
5- import {CoreStore } from "./CoreStore .sol " ;
5+ import {CrossStore } from "./CrossStore .sol " ;
66import {Account, TxAuthState} from "../proto/cross/core/auth/Auth.sol " ;
77
8- abstract contract TxAuthManager is TxAuthManagerBase , CoreStore {
8+ abstract contract TxAuthManager is TxAuthManagerBase , CrossStore {
99 function initAuthState (bytes32 txId , Account.Data[] memory signers ) internal virtual override {
10- CoreStore .AuthStorage storage s = _getAuthStorage ();
10+ CrossStore .AuthStorage storage s = _getAuthStorage ();
1111 if (s.authInitialized[txId]) revert AuthStateAlreadyInitialized (txId);
1212 _setStateFromRemainingList (s, txId, signers);
1313 s.authInitialized[txId] = true ;
1414 }
1515
1616 function isCompletedAuth (bytes32 txId ) internal view virtual override returns (bool ) {
17- CoreStore .AuthStorage storage s = _getAuthStorage ();
17+ CrossStore .AuthStorage storage s = _getAuthStorage ();
1818 if (! s.authInitialized[txId]) revert IDNotFound (txId);
1919 return s.remainingCount[txId] == 0 ;
2020 }
2121
2222 function sign (bytes32 txId , Account.Data[] memory signers ) internal virtual override returns (bool ) {
23- CoreStore .AuthStorage storage s = _getAuthStorage ();
23+ CrossStore .AuthStorage storage s = _getAuthStorage ();
2424 if (! s.authInitialized[txId]) revert IDNotFound (txId);
2525 if (s.remainingCount[txId] == 0 ) revert AuthAlreadyCompleted (txId);
2626
@@ -36,13 +36,13 @@ abstract contract TxAuthManager is TxAuthManagerBase, CoreStore {
3636 }
3737
3838 function getAuthState (bytes32 txId ) internal view virtual override returns (TxAuthState.Data memory ) {
39- CoreStore .AuthStorage storage s = _getAuthStorage ();
39+ CrossStore .AuthStorage storage s = _getAuthStorage ();
4040 if (! s.authInitialized[txId]) revert IDNotFound (txId);
4141 Account.Data[] memory remains = _getRemainingSigners (s, txId);
4242 return TxAuthState.Data ({remaining_signers: remains});
4343 }
4444
45- function _getRemainingSigners (CoreStore .AuthStorage storage s , bytes32 txId )
45+ function _getRemainingSigners (CrossStore .AuthStorage storage s , bytes32 txId )
4646 internal
4747 view
4848 returns (Account.Data[] memory out )
@@ -61,7 +61,7 @@ abstract contract TxAuthManager is TxAuthManagerBase, CoreStore {
6161 }
6262 }
6363
64- function _setStateFromRemainingList (CoreStore .AuthStorage storage s , bytes32 txId , Account.Data[] memory list )
64+ function _setStateFromRemainingList (CrossStore .AuthStorage storage s , bytes32 txId , Account.Data[] memory list )
6565 internal
6666 {
6767 for (uint256 i = 0 ; i < list.length ; ++ i) {
0 commit comments