import { ethers } from "ethers";
import { padLeft, toHex } from "web3-utils";
export const getProvider = (signerOrProvider) => {
    if (ethers.Signer.isSigner(signerOrProvider)) {
        return signerOrProvider.provider;
    }
    else {
        return signerOrProvider;
    }
};
export const toHexAndPadLeft = (num) => {
    return padLeft(toHex(num), 64, "0");
};
export { padLeft } from "web3-utils";
