feat: EthAPI: Add FilecoinAddressToEthAddress (#10343)

This commit is contained in:
Aayush Rajasekaran
2023-02-24 14:19:52 -05:00
committed by GitHub
parent 80aa6d1d64
commit 8975f0b753
11 changed files with 96 additions and 0 deletions
+4
View File
@@ -186,6 +186,10 @@ func (a *EthAPI) EthAddressToFilecoinAddress(ctx context.Context, ethAddress eth
return ethAddress.ToFilecoinAddress()
}
func (a *EthAPI) FilecoinAddressToEthAddress(ctx context.Context, filecoinAddress address.Address) (ethtypes.EthAddress, error) {
return ethtypes.EthAddressFromFilecoinAddress(filecoinAddress)
}
func (a *EthModule) countTipsetMsgs(ctx context.Context, ts *types.TipSet) (int, error) {
blkMsgs, err := a.Chain.BlockMsgsForTipset(ctx, ts)
if err != nil {