Skip to content

Commit

Permalink
pass options to apolloDashboard methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kishkoigor committed Oct 26, 2023
1 parent cd3da77 commit f0614f9
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/methods/apolloDashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,45 +27,46 @@ export function serverNodesNewStake(
contracts: Contracts,
nodeAddress: string,
rewardAddress: string,
amount: BigNumberish
amount: BigNumberish,
options?: object
) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.newStake(nodeAddress, rewardAddress, { value: amount });
return serverNodes.newStake(nodeAddress, rewardAddress, { value: amount, ...options });
}

export function serverNodesAddStake(contracts: Contracts, nodeAddress: string, amount: BigNumberish) {
export function serverNodesAddStake(contracts: Contracts, nodeAddress: string, amount: BigNumberish, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.addStake(nodeAddress, { value: amount });
return serverNodes.addStake(nodeAddress, { value: amount, ...options });
}

export function serverNodesUnstake(contracts: Contracts, nodeAddress: string, amount: BigNumberish) {
export function serverNodesUnstake(contracts: Contracts, nodeAddress: string, amount: BigNumberish, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.unstake(nodeAddress, amount);
return serverNodes.unstake(nodeAddress, amount, options);
}

export function serverNodesRestake(contracts: Contracts, nodeAddress: string) {
export function serverNodesRestake(contracts: Contracts, nodeAddress: string, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.restake(nodeAddress);
return serverNodes.restake(nodeAddress, options);
}

export function serverNodesGetStake(contracts: Contracts, nodeAddress: string) {
export function serverNodesGetStake(contracts: Contracts, nodeAddress: string, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.stakes(nodeAddress);
return serverNodes.stakes(nodeAddress, options);
}

export function serverNodesGetNodesByOwner(contracts: Contracts, ownerAddress: string) {
export function serverNodesGetNodesByOwner(contracts: Contracts, ownerAddress: string, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.getUserStakesList(ownerAddress);
return serverNodes.getUserStakesList(ownerAddress, options);
}

export function serverNodesChangeNodeOwner(contracts: Contracts, nodeAddress: string, newOwner: string) {
export function serverNodesChangeNodeOwner(contracts: Contracts, nodeAddress: string, newOwner: string, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.changeNodeOwner(nodeAddress, newOwner);
return serverNodes.changeNodeOwner(nodeAddress, newOwner, options);
}

export function serverNodesSetRewardsAddress(contracts: Contracts, nodeAddress: string, newRewardReceiver: string) {
export function serverNodesSetRewardsAddress(contracts: Contracts, nodeAddress: string, newRewardReceiver: string, options?: object) {
const serverNodes = contracts.getContractByName(ContractNames.ServerNodesManager) as ServerNodes_Manager;
return serverNodes.setRewardsAddress(nodeAddress, newRewardReceiver);
return serverNodes.setRewardsAddress(nodeAddress, newRewardReceiver, options);
}

async function lockKeeperGetLock(contracts: Contracts, lockId: BigNumberish) {
Expand Down

0 comments on commit f0614f9

Please sign in to comment.