Skip to content

Commit

Permalink
Rename the etherlink precompile addressees.
Browse files Browse the repository at this point in the history
Remove the etherlinkKernelAddress from the defaultAddresses
  • Loading branch information
skubarenko committed Aug 7, 2024
1 parent 77e9585 commit c9ed56d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const defaultAddresses = {
etherlinkKernelAddress: '0x0000000000000000000000000000000000000000',
withdrawNativeTokenPrecompileAddress: '0xff00000000000000000000000000000000000001',
withdrawNonNativeTokenPrecompileAddress: '0xff00000000000000000000000000000000000002'
nativeTokenBridgePrecompileAddress: '0xff00000000000000000000000000000000000001',
nonNativeTokenBridgePrecompileAddress: '0xff00000000000000000000000000000000000002'
} as const;
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import {
export interface Web3EtherlinkBridgeBlockchainServiceOptions {
web3: Web3;
kernelAddress?: string;
withdrawNativeTokenPrecompileAddress?: string;
withdrawNonNativeTokenPrecompileAddress?: string;
nativeTokenBridgePrecompileAddress?: string;
nonNativeTokenBridgePrecompileAddress?: string;
}

export class Web3EtherlinkBridgeBlockchainService implements EtherlinkBridgeBlockchainService<
Expand All @@ -38,8 +38,8 @@ export class Web3EtherlinkBridgeBlockchainService implements EtherlinkBridgeBloc

constructor(options: Web3EtherlinkBridgeBlockchainServiceOptions) {
this.web3 = options.web3;
this.nativeTokenBridgePrecompiledAddress = options.withdrawNativeTokenPrecompileAddress || defaultAddresses.withdrawNativeTokenPrecompileAddress;
this.nonNativeTokenBridgePrecompiledAddress = options.withdrawNonNativeTokenPrecompileAddress || defaultAddresses.withdrawNonNativeTokenPrecompileAddress;
this.nativeTokenBridgePrecompiledAddress = options.nativeTokenBridgePrecompileAddress || defaultAddresses.nativeTokenBridgePrecompileAddress;
this.nonNativeTokenBridgePrecompiledAddress = options.nonNativeTokenBridgePrecompileAddress || defaultAddresses.nonNativeTokenBridgePrecompileAddress;

this.nativeTokenBridgePrecompile = new this.web3.eth.Contract(
nativeTokenBridgePrecompile,
Expand Down

0 comments on commit c9ed56d

Please sign in to comment.