-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from lidofinance/feature/si-827-apr
Feature/si 827 apr
- Loading branch information
Showing
19 changed files
with
612 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,6 @@ export type HeadMessage = | |
| 'LOG:' | ||
| 'Cache:' | ||
| 'Init:' | ||
| 'Permit:'; | ||
| 'Permit:' | ||
| 'Events:' | ||
| 'Statistic:'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
export const StethEventsAbi = [ | ||
{ payable: true, stateMutability: 'payable', type: 'fallback' }, | ||
{ | ||
anonymous: false, | ||
inputs: [], | ||
name: 'StakingPaused', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [], | ||
name: 'StakingResumed', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: false, name: 'maxStakeLimit', type: 'uint256' }, | ||
{ | ||
indexed: false, | ||
name: 'stakeLimitIncreasePerBlock', | ||
type: 'uint256', | ||
}, | ||
], | ||
name: 'StakingLimitSet', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [], | ||
name: 'StakingLimitRemoved', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'reportTimestamp', type: 'uint256' }, | ||
{ indexed: false, name: 'preCLValidators', type: 'uint256' }, | ||
{ indexed: false, name: 'postCLValidators', type: 'uint256' }, | ||
], | ||
name: 'CLValidatorsUpdated', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'depositedValidators', type: 'uint256' }], | ||
name: 'DepositedValidatorsChanged', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'reportTimestamp', type: 'uint256' }, | ||
{ indexed: false, name: 'preCLBalance', type: 'uint256' }, | ||
{ indexed: false, name: 'postCLBalance', type: 'uint256' }, | ||
{ indexed: false, name: 'withdrawalsWithdrawn', type: 'uint256' }, | ||
{ | ||
indexed: false, | ||
name: 'executionLayerRewardsWithdrawn', | ||
type: 'uint256', | ||
}, | ||
{ indexed: false, name: 'postBufferedEther', type: 'uint256' }, | ||
], | ||
name: 'ETHDistributed', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'reportTimestamp', type: 'uint256' }, | ||
{ indexed: false, name: 'timeElapsed', type: 'uint256' }, | ||
{ indexed: false, name: 'preTotalShares', type: 'uint256' }, | ||
{ indexed: false, name: 'preTotalEther', type: 'uint256' }, | ||
{ indexed: false, name: 'postTotalShares', type: 'uint256' }, | ||
{ indexed: false, name: 'postTotalEther', type: 'uint256' }, | ||
{ indexed: false, name: 'sharesMintedAsFees', type: 'uint256' }, | ||
], | ||
name: 'TokenRebased', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'lidoLocator', type: 'address' }], | ||
name: 'LidoLocatorSet', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'amount', type: 'uint256' }], | ||
name: 'ELRewardsReceived', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'amount', type: 'uint256' }], | ||
name: 'WithdrawalsReceived', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'sender', type: 'address' }, | ||
{ indexed: false, name: 'amount', type: 'uint256' }, | ||
{ indexed: false, name: 'referral', type: 'address' }, | ||
], | ||
name: 'Submitted', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'amount', type: 'uint256' }], | ||
name: 'Unbuffered', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'executor', type: 'address' }, | ||
{ indexed: false, name: 'script', type: 'bytes' }, | ||
{ indexed: false, name: 'input', type: 'bytes' }, | ||
{ indexed: false, name: 'returnData', type: 'bytes' }, | ||
], | ||
name: 'ScriptResult', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'vault', type: 'address' }, | ||
{ indexed: true, name: 'token', type: 'address' }, | ||
{ indexed: false, name: 'amount', type: 'uint256' }, | ||
], | ||
name: 'RecoverToVault', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'eip712StETH', type: 'address' }], | ||
name: 'EIP712StETHInitialized', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'from', type: 'address' }, | ||
{ indexed: true, name: 'to', type: 'address' }, | ||
{ indexed: false, name: 'sharesValue', type: 'uint256' }, | ||
], | ||
name: 'TransferShares', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'account', type: 'address' }, | ||
{ indexed: false, name: 'preRebaseTokenAmount', type: 'uint256' }, | ||
{ indexed: false, name: 'postRebaseTokenAmount', type: 'uint256' }, | ||
{ indexed: false, name: 'sharesAmount', type: 'uint256' }, | ||
], | ||
name: 'SharesBurnt', | ||
type: 'event', | ||
}, | ||
{ anonymous: false, inputs: [], name: 'Stopped', type: 'event' }, | ||
{ anonymous: false, inputs: [], name: 'Resumed', type: 'event' }, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'from', type: 'address' }, | ||
{ indexed: true, name: 'to', type: 'address' }, | ||
{ indexed: false, name: 'value', type: 'uint256' }, | ||
], | ||
name: 'Transfer', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, name: 'owner', type: 'address' }, | ||
{ indexed: true, name: 'spender', type: 'address' }, | ||
{ indexed: false, name: 'value', type: 'uint256' }, | ||
], | ||
name: 'Approval', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [{ indexed: false, name: 'version', type: 'uint256' }], | ||
name: 'ContractVersionSet', | ||
type: 'event', | ||
}, | ||
] as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { LidoSDKCore } from '../core/index.js'; | ||
import { version } from '../version.js'; | ||
|
||
import { LidoSDKStethEvents } from './stethEvents.js'; | ||
import type { LidoSDKEventsProps } from './types.js'; | ||
|
||
export class LidoSDKEvents { | ||
readonly core: LidoSDKCore; | ||
readonly stethEvents: LidoSDKStethEvents; | ||
|
||
constructor(props: LidoSDKEventsProps) { | ||
const { core, ...rest } = props; | ||
|
||
if (core) this.core = core; | ||
else this.core = new LidoSDKCore(rest, version); | ||
|
||
this.stethEvents = new LidoSDKStethEvents({ ...rest, core: this.core }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { LidoSDKEvents } from './events.js'; |
Oops, something went wrong.