-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03581b2
commit 1321dcc
Showing
12 changed files
with
340 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package stub | ||
|
||
import ( | ||
ethcommon "github.com/ethereum/go-ethereum/common" | ||
"github.com/zeta-chain/zetacore/common" | ||
crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types" | ||
"github.com/zeta-chain/zetacore/zetaclient/interfaces" | ||
"github.com/zeta-chain/zetacore/zetaclient/outtxprocessor" | ||
) | ||
|
||
// ---------------------------------------------------------------------------- | ||
// EVMSigner | ||
// ---------------------------------------------------------------------------- | ||
var _ interfaces.ChainSigner = (*EVMSigner)(nil) | ||
|
||
// EVMSigner is a mock of evm chain signer for testing | ||
type EVMSigner struct { | ||
Chain common.Chain | ||
ZetaConnectorAddress ethcommon.Address | ||
ERC20CustodyAddress ethcommon.Address | ||
} | ||
|
||
func NewEVMSigner( | ||
chain common.Chain, | ||
zetaConnectorAddress ethcommon.Address, | ||
erc20CustodyAddress ethcommon.Address, | ||
) *EVMSigner { | ||
return &EVMSigner{ | ||
Chain: chain, | ||
ZetaConnectorAddress: zetaConnectorAddress, | ||
ERC20CustodyAddress: erc20CustodyAddress, | ||
} | ||
} | ||
|
||
func (s *EVMSigner) TryProcessOutTx( | ||
_ *crosschaintypes.CrossChainTx, | ||
_ *outtxprocessor.Processor, | ||
_ string, | ||
_ interfaces.ChainClient, | ||
_ interfaces.ZetaCoreBridger, | ||
_ uint64, | ||
) { | ||
} | ||
|
||
func (s *EVMSigner) SetZetaConnectorAddress(address ethcommon.Address) { | ||
s.ZetaConnectorAddress = address | ||
} | ||
|
||
func (s *EVMSigner) SetERC20CustodyAddress(address ethcommon.Address) { | ||
s.ERC20CustodyAddress = address | ||
} | ||
|
||
func (s *EVMSigner) GetZetaConnectorAddress() ethcommon.Address { | ||
return s.ZetaConnectorAddress | ||
} | ||
|
||
func (s *EVMSigner) GetERC20CustodyAddress() ethcommon.Address { | ||
return s.ERC20CustodyAddress | ||
} | ||
|
||
// ---------------------------------------------------------------------------- | ||
// BTCSigner | ||
// ---------------------------------------------------------------------------- | ||
var _ interfaces.ChainSigner = (*BTCSigner)(nil) | ||
|
||
// BTCSigner is a mock of bitcoin chain signer for testing | ||
type BTCSigner struct { | ||
} | ||
|
||
func NewBTCSigner() *BTCSigner { | ||
return &BTCSigner{} | ||
} | ||
|
||
func (s *BTCSigner) TryProcessOutTx( | ||
_ *crosschaintypes.CrossChainTx, | ||
_ *outtxprocessor.Processor, | ||
_ string, | ||
_ interfaces.ChainClient, | ||
_ interfaces.ZetaCoreBridger, | ||
_ uint64, | ||
) { | ||
} | ||
|
||
func (s *BTCSigner) SetZetaConnectorAddress(_ ethcommon.Address) { | ||
} | ||
|
||
func (s *BTCSigner) SetERC20CustodyAddress(_ ethcommon.Address) { | ||
} | ||
|
||
func (s *BTCSigner) GetZetaConnectorAddress() ethcommon.Address { | ||
return ethcommon.Address{} | ||
} | ||
|
||
func (s *BTCSigner) GetERC20CustodyAddress() ethcommon.Address { | ||
return ethcommon.Address{} | ||
} |
Oops, something went wrong.