Class: Minter::EditCandidateTx

Inherits:
Transaction show all
Defined in:
lib/minter/transactions/edit_candidate_tx.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Transaction

#multisign, #sign, #tx_hash

Constructor Details

#initialize(pubkey:, reward_address:, owner_address:, control_address:, nonce:, chain_id:, gas_coin:, gas_price:) ⇒ EditCandidateTx

rubocop:disable Metrics/ParameterLists



7
8
9
10
11
12
13
14
15
16
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 7

def initialize(pubkey:, reward_address:, owner_address:, control_address:, nonce:, chain_id:, gas_coin:, gas_price:) # rubocop:disable Metrics/ParameterLists
  @pubkey = pubkey
  @reward_address = reward_address
  @owner_address = owner_address
  @control_address = control_address
  @nonce = nonce
  @chain_id = chain_id
  @gas_coin = gas_coin
  @gas_price = gas_price
end

Instance Attribute Details

#chain_idObject

Returns the value of attribute chain_id.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def chain_id
  @chain_id
end

#control_addressObject

Returns the value of attribute control_address.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def control_address
  @control_address
end

#gas_coinObject

Returns the value of attribute gas_coin.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def gas_coin
  @gas_coin
end

#gas_priceObject

Returns the value of attribute gas_price.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def gas_price
  @gas_price
end

#nonceObject

Returns the value of attribute nonce.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def nonce
  @nonce
end

#owner_addressObject

Returns the value of attribute owner_address.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def owner_address
  @owner_address
end

#pubkeyObject

Returns the value of attribute pubkey.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def pubkey
  @pubkey
end

#reward_addressObject

Returns the value of attribute reward_address.



5
6
7
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 5

def reward_address
  @reward_address
end

Instance Method Details

#to_paramsObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/minter/transactions/edit_candidate_tx.rb', line 18

def to_params
  { PubKey: pubkey,
    RewardAddress: reward_address,
    OwnerAddress: owner_address,
    ControlAddress: control_address,
    Nonce: nonce,
    ChainId: chain_id,
    GasCoin: gas_coin,
    GasPrice: gas_price }
end