mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
15 lines
314 B
Go
15 lines
314 B
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
"github.com/ethereum/go-ethereum/common"
|
||
|
)
|
||
|
|
||
|
func SdkToEvmAddress(addr sdk.AccAddress) common.Address {
|
||
|
return common.BytesToAddress(addr.Bytes())
|
||
|
}
|
||
|
|
||
|
func EvmToSdkAddress(addr common.Address) sdk.AccAddress {
|
||
|
return sdk.AccAddress(addr.Bytes())
|
||
|
}
|