Skip to content

Commit

Permalink
Merge pull request #28 from XP-NETWORK/feat/staking-caller
Browse files Browse the repository at this point in the history
feat(staking): fetch caller from event
  • Loading branch information
D4mph1r authored Dec 19, 2024
2 parents 8c28108 + e45a1d1 commit 7f802cf
Show file tree
Hide file tree
Showing 43 changed files with 2,874 additions and 31 deletions.
33 changes: 33 additions & 0 deletions src/contractsTypes/evm/contracts/Bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export interface BridgeInterface extends Interface {
| "originalStorageMapping721"
| "originalToDuplicateMapping"
| "proxiableUUID"
| "resetReward"
| "rewardVals"
| "selfChain"
| "storageDeployer"
| "uniqueIdentifier"
Expand Down Expand Up @@ -207,6 +209,14 @@ export interface BridgeInterface extends Interface {
functionFragment: "proxiableUUID",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "resetReward",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "rewardVals",
values: [AddressLike[]]
): string;
encodeFunctionData(functionFragment: "selfChain", values?: undefined): string;
encodeFunctionData(
functionFragment: "storageDeployer",
Expand Down Expand Up @@ -304,6 +314,11 @@ export interface BridgeInterface extends Interface {
functionFragment: "proxiableUUID",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "resetReward",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "rewardVals", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "selfChain", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "storageDeployer",
Expand Down Expand Up @@ -715,6 +730,14 @@ export interface Bridge extends BaseContract {

proxiableUUID: TypedContractMethod<[], [string], "view">;

resetReward: TypedContractMethod<[], [boolean], "view">;

rewardVals: TypedContractMethod<
[validatorsToReward: AddressLike[]],
[void],
"nonpayable"
>;

selfChain: TypedContractMethod<[], [string], "view">;

storageDeployer: TypedContractMethod<[], [string], "view">;
Expand Down Expand Up @@ -862,6 +885,16 @@ export interface Bridge extends BaseContract {
getFunction(
nameOrSignature: "proxiableUUID"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "resetReward"
): TypedContractMethod<[], [boolean], "view">;
getFunction(
nameOrSignature: "rewardVals"
): TypedContractMethod<
[validatorsToReward: AddressLike[]],
[void],
"nonpayable"
>;
getFunction(
nameOrSignature: "selfChain"
): TypedContractMethod<[], [string], "view">;
Expand Down
5 changes: 4 additions & 1 deletion src/contractsTypes/evm/contracts/ERC20Staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@ export interface ERC20StakingInterface extends Interface {

export namespace StakedEvent {
export type InputTuple = [
sender: AddressLike,
amount: BigNumberish,
validatorAddressAndChainType: ValidatorAddressAndChainTypeStruct[]
];
export type OutputTuple = [
sender: string,
amount: bigint,
validatorAddressAndChainType: ValidatorAddressAndChainTypeStructOutput[]
];
export interface OutputObject {
sender: string;
amount: bigint;
validatorAddressAndChainType: ValidatorAddressAndChainTypeStructOutput[];
}
Expand Down Expand Up @@ -199,7 +202,7 @@ export interface ERC20Staking extends BaseContract {
>;

filters: {
"Staked(uint256,tuple[])": TypedContractEvent<
"Staked(address,uint256,tuple[])": TypedContractEvent<
StakedEvent.InputTuple,
StakedEvent.OutputTuple,
StakedEvent.OutputObject
Expand Down
Loading

0 comments on commit 7f802cf

Please sign in to comment.