This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ethereum-staking): Rename application to ethereum-staking
- Loading branch information
1 parent
d788d3c
commit 00ab47f
Showing
16 changed files
with
527 additions
and
150 deletions.
There are no files selected for viewing
File renamed without changes
48 changes: 48 additions & 0 deletions
48
src/apps/ethereum-staking/contracts/abis/ethereum-staking-deposit.json
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,48 @@ | ||
[ | ||
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": false, "internalType": "bytes", "name": "pubkey", "type": "bytes" }, | ||
{ "indexed": false, "internalType": "bytes", "name": "withdrawal_credentials", "type": "bytes" }, | ||
{ "indexed": false, "internalType": "bytes", "name": "amount", "type": "bytes" }, | ||
{ "indexed": false, "internalType": "bytes", "name": "signature", "type": "bytes" }, | ||
{ "indexed": false, "internalType": "bytes", "name": "index", "type": "bytes" } | ||
], | ||
"name": "DepositEvent", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "bytes", "name": "pubkey", "type": "bytes" }, | ||
{ "internalType": "bytes", "name": "withdrawal_credentials", "type": "bytes" }, | ||
{ "internalType": "bytes", "name": "signature", "type": "bytes" }, | ||
{ "internalType": "bytes32", "name": "deposit_data_root", "type": "bytes32" } | ||
], | ||
"name": "deposit", | ||
"outputs": [], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "get_deposit_count", | ||
"outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "get_deposit_root", | ||
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], | ||
"name": "supportsInterface", | ||
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], | ||
"stateMutability": "pure", | ||
"type": "function" | ||
} | ||
] |
183 changes: 183 additions & 0 deletions
183
src/apps/ethereum-staking/contracts/ethers/EthereumStakingDeposit.ts
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,183 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { | ||
BaseContract, | ||
BigNumber, | ||
BytesLike, | ||
CallOverrides, | ||
ContractTransaction, | ||
PayableOverrides, | ||
PopulatedTransaction, | ||
Signer, | ||
utils, | ||
} from 'ethers'; | ||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; | ||
import type { Listener, Provider } from '@ethersproject/providers'; | ||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; | ||
|
||
export interface EthereumStakingDepositInterface extends utils.Interface { | ||
functions: { | ||
'deposit(bytes,bytes,bytes,bytes32)': FunctionFragment; | ||
'get_deposit_count()': FunctionFragment; | ||
'get_deposit_root()': FunctionFragment; | ||
'supportsInterface(bytes4)': FunctionFragment; | ||
}; | ||
|
||
getFunction( | ||
nameOrSignatureOrTopic: 'deposit' | 'get_deposit_count' | 'get_deposit_root' | 'supportsInterface', | ||
): FunctionFragment; | ||
|
||
encodeFunctionData( | ||
functionFragment: 'deposit', | ||
values: [ | ||
PromiseOrValue<BytesLike>, | ||
PromiseOrValue<BytesLike>, | ||
PromiseOrValue<BytesLike>, | ||
PromiseOrValue<BytesLike>, | ||
], | ||
): string; | ||
encodeFunctionData(functionFragment: 'get_deposit_count', values?: undefined): string; | ||
encodeFunctionData(functionFragment: 'get_deposit_root', values?: undefined): string; | ||
encodeFunctionData(functionFragment: 'supportsInterface', values: [PromiseOrValue<BytesLike>]): string; | ||
|
||
decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: 'get_deposit_count', data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: 'get_deposit_root', data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; | ||
|
||
events: { | ||
'DepositEvent(bytes,bytes,bytes,bytes,bytes)': EventFragment; | ||
}; | ||
|
||
getEvent(nameOrSignatureOrTopic: 'DepositEvent'): EventFragment; | ||
} | ||
|
||
export interface DepositEventEventObject { | ||
pubkey: string; | ||
withdrawal_credentials: string; | ||
amount: string; | ||
signature: string; | ||
index: string; | ||
} | ||
export type DepositEventEvent = TypedEvent<[string, string, string, string, string], DepositEventEventObject>; | ||
|
||
export type DepositEventEventFilter = TypedEventFilter<DepositEventEvent>; | ||
|
||
export interface EthereumStakingDeposit extends BaseContract { | ||
connect(signerOrProvider: Signer | Provider | string): this; | ||
attach(addressOrName: string): this; | ||
deployed(): Promise<this>; | ||
|
||
interface: EthereumStakingDepositInterface; | ||
|
||
queryFilter<TEvent extends TypedEvent>( | ||
event: TypedEventFilter<TEvent>, | ||
fromBlockOrBlockhash?: string | number | undefined, | ||
toBlock?: string | number | undefined, | ||
): Promise<Array<TEvent>>; | ||
|
||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>; | ||
listeners(eventName?: string): Array<Listener>; | ||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this; | ||
removeAllListeners(eventName?: string): this; | ||
off: OnEvent<this>; | ||
on: OnEvent<this>; | ||
once: OnEvent<this>; | ||
removeListener: OnEvent<this>; | ||
|
||
functions: { | ||
deposit( | ||
pubkey: PromiseOrValue<BytesLike>, | ||
withdrawal_credentials: PromiseOrValue<BytesLike>, | ||
signature: PromiseOrValue<BytesLike>, | ||
deposit_data_root: PromiseOrValue<BytesLike>, | ||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }, | ||
): Promise<ContractTransaction>; | ||
|
||
get_deposit_count(overrides?: CallOverrides): Promise<[string]>; | ||
|
||
get_deposit_root(overrides?: CallOverrides): Promise<[string]>; | ||
|
||
supportsInterface(interfaceId: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<[boolean]>; | ||
}; | ||
|
||
deposit( | ||
pubkey: PromiseOrValue<BytesLike>, | ||
withdrawal_credentials: PromiseOrValue<BytesLike>, | ||
signature: PromiseOrValue<BytesLike>, | ||
deposit_data_root: PromiseOrValue<BytesLike>, | ||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }, | ||
): Promise<ContractTransaction>; | ||
|
||
get_deposit_count(overrides?: CallOverrides): Promise<string>; | ||
|
||
get_deposit_root(overrides?: CallOverrides): Promise<string>; | ||
|
||
supportsInterface(interfaceId: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>; | ||
|
||
callStatic: { | ||
deposit( | ||
pubkey: PromiseOrValue<BytesLike>, | ||
withdrawal_credentials: PromiseOrValue<BytesLike>, | ||
signature: PromiseOrValue<BytesLike>, | ||
deposit_data_root: PromiseOrValue<BytesLike>, | ||
overrides?: CallOverrides, | ||
): Promise<void>; | ||
|
||
get_deposit_count(overrides?: CallOverrides): Promise<string>; | ||
|
||
get_deposit_root(overrides?: CallOverrides): Promise<string>; | ||
|
||
supportsInterface(interfaceId: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<boolean>; | ||
}; | ||
|
||
filters: { | ||
'DepositEvent(bytes,bytes,bytes,bytes,bytes)'( | ||
pubkey?: null, | ||
withdrawal_credentials?: null, | ||
amount?: null, | ||
signature?: null, | ||
index?: null, | ||
): DepositEventEventFilter; | ||
DepositEvent( | ||
pubkey?: null, | ||
withdrawal_credentials?: null, | ||
amount?: null, | ||
signature?: null, | ||
index?: null, | ||
): DepositEventEventFilter; | ||
}; | ||
|
||
estimateGas: { | ||
deposit( | ||
pubkey: PromiseOrValue<BytesLike>, | ||
withdrawal_credentials: PromiseOrValue<BytesLike>, | ||
signature: PromiseOrValue<BytesLike>, | ||
deposit_data_root: PromiseOrValue<BytesLike>, | ||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }, | ||
): Promise<BigNumber>; | ||
|
||
get_deposit_count(overrides?: CallOverrides): Promise<BigNumber>; | ||
|
||
get_deposit_root(overrides?: CallOverrides): Promise<BigNumber>; | ||
|
||
supportsInterface(interfaceId: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>; | ||
}; | ||
|
||
populateTransaction: { | ||
deposit( | ||
pubkey: PromiseOrValue<BytesLike>, | ||
withdrawal_credentials: PromiseOrValue<BytesLike>, | ||
signature: PromiseOrValue<BytesLike>, | ||
deposit_data_root: PromiseOrValue<BytesLike>, | ||
overrides?: PayableOverrides & { from?: PromiseOrValue<string> }, | ||
): Promise<PopulatedTransaction>; | ||
|
||
get_deposit_count(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
|
||
get_deposit_root(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
|
||
supportsInterface(interfaceId: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
}; | ||
} |
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,32 @@ | ||
/* Autogenerated file. Do not edit manually. */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { Listener } from '@ethersproject/providers'; | ||
import type { Event, EventFilter } from 'ethers'; | ||
|
||
export interface TypedEvent<TArgsArray extends Array<any> = any, TArgsObject = any> extends Event { | ||
args: TArgsArray & TArgsObject; | ||
} | ||
|
||
export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {} | ||
|
||
export interface TypedListener<TEvent extends TypedEvent> { | ||
(...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void; | ||
} | ||
|
||
type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never; | ||
|
||
export interface OnEvent<TRes> { | ||
<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes; | ||
(eventName: string, listener: Listener): TRes; | ||
} | ||
|
||
export type MinEthersFactory<C, ARGS> = { | ||
deploy(...a: ARGS[]): Promise<C>; | ||
}; | ||
|
||
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never; | ||
|
||
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F['deploy']> : never; | ||
|
||
export type PromiseOrValue<T> = T | Promise<T>; |
Oops, something went wrong.