Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update childChain to childNetwork on public methods for bridgers #513

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/lib/assetBridger/assetBridger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,34 @@ export abstract class AssetBridger<DepositParams, WithdrawParams> {
/**
* In case of a chain that uses ETH as its native/gas token, this is either `undefined` or the zero address
*
* In case of a chain that uses an ERC-20 token from the parent chain as its native/gas token, this is the address of said token on the parent chain
* In case of a chain that uses an ERC-20 token from the parent network as its native/gas token, this is the address of said token on the parent network
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed mentions of "parent chain" in comments to "parent network" as well because it read really strange most of the time when referring to parent chains and child networks.

*/
public readonly nativeToken?: string

public constructor(public readonly childChain: ArbitrumNetwork) {
this.nativeToken = childChain.nativeToken
public constructor(public readonly childNetwork: ArbitrumNetwork) {
this.nativeToken = childNetwork.nativeToken
}

/**
* Check the signer/provider matches the parentChain, throws if not
* Check the signer/provider matches the parent network, throws if not
* @param sop
*/
protected async checkParentChain(sop: SignerOrProvider): Promise<void> {
protected async checkParentNetwork(sop: SignerOrProvider): Promise<void> {
await SignerProviderUtils.checkNetworkMatches(
sop,
this.childChain.parentChainId
this.childNetwork.parentChainId
)
}

/**
* Check the signer/provider matches the childChain, throws if not
* Check the signer/provider matches the child network, throws if not
* @param sop
*/
protected async checkChildChain(sop: SignerOrProvider): Promise<void> {
await SignerProviderUtils.checkNetworkMatches(sop, this.childChain.chainId)
protected async checkChildNetwork(sop: SignerOrProvider): Promise<void> {
await SignerProviderUtils.checkNetworkMatches(
sop,
this.childNetwork.chainId
)
}

/**
Expand Down
Loading
Loading