mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05:18 +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())
|
||
|
}
|