Skip to content

Class: DAONodeTrustedActions

Rocket Pool DAO Trusted Node Actions

Constructors

constructor

new DAONodeTrustedActions(web3, contracts)

Create a new DAONodeTrustedActions instance.

Parameters

NameTypeDescription
web3defaultA valid Web3 instance
contractsContractsA Rocket Pool contract manager instance

Defined in

rocketpool/dao/node/trusted/actions.ts:18

Accessors

rocketDAONodeTrustedActions

Private get rocketDAONodeTrustedActions(): Promise<Contract>

Private accessor use to retrieve the related contract

Returns

Promise<Contract>

a Promise<Contract> with a web3.eth.contract instance of the rocketDAONodeTrustedActions contract

Defined in

rocketpool/dao/node/trusted/actions.ts:24

Methods

actionJoin

actionJoin(options?, onConfirmation?): Promise<TransactionReceipt>

Join the DAO

example using Typescript

ts
const nodeAddress = "0x24fBeD7Ecd625D3f0FD19a6c9113DEd436172294";
const options = {
		from: nodeAddress,
		gas: 1000000
}
const txReceipt = rp.dao.node.trusted.actions.actionJoin(options).then((txReceipt: TransactionReceipt) => { txReceipt };

Parameters

NameTypeDescription
options?SendOptionsAn optional object of web3.eth.Contract SendOptions
onConfirmation?ConfirmationHandlerAn optional confirmation handler object

Returns

Promise<TransactionReceipt>

a Promise<TransactionReceipt> that resolves to a TransactionReceipt object representing the receipt of the transaction

Defined in

rocketpool/dao/node/trusted/actions.ts:44


actionLeave

actionLeave(refundAddress, options?, onConfirmation?): Promise<TransactionReceipt>

Leave the DAO

example using Typescript

ts
const nodeAddress = "0x24fBeD7Ecd625D3f0FD19a6c9113DEd436172294";
const options = {
		from: nodeAddress,
		gas: 1000000
}
const txReceipt = rp.dao.node.trusted.actions.actionLeave(options).then((txReceipt: TransactionReceipt) => { txReceipt };

Parameters

NameTypeDescription
refundAddressstring-
options?SendOptionsAn optional object of web3.eth.Contract SendOptions
onConfirmation?ConfirmationHandlerAn optional confirmation handler object

Returns

Promise<TransactionReceipt>

a Promise<TransactionReceipt> that resolves to a TransactionReceipt object representing the receipt of the transaction

Defined in

rocketpool/dao/node/trusted/actions.ts:66


actionChallengeMake

actionChallengeMake(address, options?, onConfirmation?): Promise<TransactionReceipt>

Challenge another DAO member

example using Typescript

ts
const addressToChallenge = "0x421433c3f99529A704Ec2270E1A68fa66DD8bD79";
const nodeAddress = "0x24fBeD7Ecd625D3f0FD19a6c9113DEd436172294";
const options = {
		from: nodeAddress,
		gas: 1000000
}
const txReceipt = rp.dao.node.trusted.actions.actionChallengeMake(addressToChallenge, options).then((txReceipt: TransactionReceipt) => { txReceipt };

Parameters

NameTypeDescription
addressstringA string representing the address of the DAO member you want challenge
options?SendOptionsAn optional object of web3.eth.Contract SendOptions
onConfirmation?ConfirmationHandlerAn optional confirmation handler object

Returns

Promise<TransactionReceipt>

a Promise<TransactionReceipt> that resolves to a TransactionReceipt object representing the receipt of the transaction

Defined in

rocketpool/dao/node/trusted/actions.ts:90


actionChallengeDecide

actionChallengeDecide(address, options?, onConfirmation?): Promise<TransactionReceipt>

Decides the success of a challenge

example using Typescript

ts
const addressToChallenge = "0x421433c3f99529A704Ec2270E1A68fa66DD8bD79";
const nodeAddress = "0x24fBeD7Ecd625D3f0FD19a6c9113DEd436172294";
const options = {
		from: nodeAddress,
		gas: 1000000
}
const txReceipt = rp.dao.node.trusted.actions.actionChallengeMake(addressToChallenge, options).then((txReceipt: TransactionReceipt) => { txReceipt };

Parameters

NameTypeDescription
addressstringA string representing the address of the DAO member you want challenge
options?SendOptionsAn optional object of web3.eth.Contract SendOptions
onConfirmation?ConfirmationHandlerAn optional confirmation handler object

Returns

Promise<TransactionReceipt>

a Promise<TransactionReceipt> that resolves to a TransactionReceipt object representing the receipt of the transaction

Defined in

rocketpool/dao/node/trusted/actions.ts:114