Skip to content

Commit

Permalink
Make param and constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Aug 8, 2023
1 parent e388da6 commit 12fd957
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions balancer-js/src/modules/data/gyro-config/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ export interface GyroConfigRepository {

const protocolFeePercKey = formatBytes32String('PROTOCOL_SWAP_FEE_PERC');
const gyroPoolTypeKey = formatBytes32String('E-CLP');
const encodedPoolTypeKey = keccak256(
['bytes'],
[
defaultAbiCoder.encode(
['bytes32', 'bytes32'],
[protocolFeePercKey, gyroPoolTypeKey]
),
]
);

export class GyroConfigRepositoryImpl implements GyroConfigRepository {
gyroConfigInterface: GyroConfigInterface;
Expand All @@ -20,7 +29,7 @@ export class GyroConfigRepositoryImpl implements GyroConfigRepository {
constructor(
private gyroConfigAddress: string,
private multicall: Multicall,
private provider: Provider
provider: Provider
) {
this.gyroConfigInterface = GyroConfig__factory.createInterface();
this.gyroConfig = GyroConfig__factory.connect(gyroConfigAddress, provider);
Expand All @@ -37,16 +46,6 @@ export class GyroConfigRepositoryImpl implements GyroConfigRepository {
),
]
);

const encodedPoolTypeKey = keccak256(
['bytes'],
[
defaultAbiCoder.encode(
['bytes32', 'bytes32'],
[protocolFeePercKey, gyroPoolTypeKey]
),
]
);
const payload = [
{
target: this.gyroConfigAddress,
Expand Down

0 comments on commit 12fd957

Please sign in to comment.