mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-17 00:31:34 +03:00
export generateCalldata function without unit param
This commit is contained in:
9
src/utils/addressLikeToString.ts
Normal file
9
src/utils/addressLikeToString.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { AddressLike } from "ethers";
|
||||
|
||||
export async function addressLikeToString(address: AddressLike): Promise<string> {
|
||||
address = await address
|
||||
if (typeof address !== 'string') {
|
||||
address = await address.getAddress()
|
||||
}
|
||||
return address
|
||||
}
|
||||
Reference in New Issue
Block a user