Skip to content
This repository was archived by the owner on Dec 26, 2017. It is now read-only.

Oracles contract definition

Victor edited this page Nov 20, 2017 · 1 revision

Oracles contract definition

function

addBallot 9ec5ade2

Adds new Ballot

inputs 0 uint256 ballotID

Ballot unique ID

1 address owner

Voting key of notary, who creates ballot

2 address miningKey

Mining key of notary, which is proposed to add or remove

3 address affectedKey

Mining/payout/voting key of notary, which is proposed to add or remove

4 uint256 affectedKeyType

Type of affectedKey: 0 = mining key, 1 = voting key, 2 = payout key

4 uint256 duration

Duration of ballot in minutes

5 bool addAction

Flag: adding is true, removing is false

6 string memo

Ballot's memo

function

addInitialKey aff63d5e

Adds initial key

inputs 0 address key

Initial key

function

insertValidatorFromCeremony 0aeee835

Adds new notary's personal info. It is from Ceremony dApp

inputs 0 address miningKey

Notary's mining key

1 uint256 zip

Notary's zip code

2 uint256 licenseID

Notary's license ID

3 uint256 licenseExpiredAt

Notary's expiration date

4 string fullName

Notary's full name

5 string streetName

Notary's address

6 string state

Notary's US state full name

function

upsertValidatorFromGovernance 0aeee835

Adds or changes notary's personal info. Both are from Governance dApp

inputs 0 address miningKey

Notary's mining key

1 uint256 zip

Notary's zip code

2 uint256 licenseID

Notary's license ID

3 uint256 licenseExpiredAt

Notary's expiration date

4 string fullName

Notary's full name

5 string streetName

Notary's address

6 string state

Notary's US state full name

function, constant

ballotCreatedAt b045d117

Gets ballot's creation time

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 uint256 value

Ballot's creation time

function, constant

ballotIsActive 75f358cc

Checks, if ballot is active

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 bool value

Ballot's activity: active or not

function, constant

ballotIsVoted 6f2dc1c1

Checks, if ballot is already voted by signer of current transaction

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 bool value

Ballot is already voted by signer of current transaction: yes or no

function, constant

ballots 5c632b38

inputs 0 uint256
outputs 0 uint256
function, constant

ballotsMapping 32d21d00

inputs 0 uint256
outputs 0 address owner
1 address miningKey
2 address affectedKey
3 string memo
4 uint256 affectedKeyType
5 uint256 createdAt
6 uint256 votingStart
7 uint256 votingDeadline
8 int256 votesAmmount
9 int256 result
10 bool addAction
11 bool active
function, constant

checkInitialKey 31567174

Checks, if initial key is new or not

inputs 0 address key

Initial key

outputs 0 bool value

Is initial key new or not new

function, constant

checkPayoutKeyValidity dfecd974

Checks, if payout key is active or not

inputs 0 address addr

Payout key

outputs 0 bool value

Is payout key active or not active

function, constant

checkVotingKeyValidity f40d9985

Checks, if voting key is active or not

inputs 0 address addr

Voting key

outputs 0 bool value

Is voting key active or not active

function

createKeys c6232a15

Create production keys for notary

inputs 0 address miningAddr

Mining key

1 address payoutAddr

Payout key

2 address votingAddr

Voting key

function, constant

disabledValidators 820e4a24

inputs 0 uint256
outputs 0 address
function, constant

getBallotAction a7666dad

Gets ballot's action

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 bool value

Ballot's action: adding is true, removing is false

function, constant

getBallotAffectedKey 075f1d47

Gets affected key of ballot

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 address value

Ballot's affected key

function, constant

getBallotAffectedKeyType a411e345

Gets affected key type of ballot

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 uint256 value

Ballot's affected key type

function, constant

getBallotMemo 11fc7f97

Gets ballot's memo

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 string value

Ballot's memo

function, constant

getBallotMiningKey a88ccf6e

Gets mining key of notary

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 address value

Notary's mining key

function, constant

getBallotOwner 8334add4

Gets ballot's owner full name

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 string value

Ballot's owner full name

function, constant

getBallotVotingEnd a59c3408

Gets ballot's voting end date

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 uint256 value

Ballot's voting end date

function, constant

getBallotVotingStart 2abf367f

Gets ballot's voting start date

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 uint256 value

Ballot's voting start date

function, constant

getBallots eb87c6dc

Gets all ballots' ids

outputs 0 uint256[] value

Array of all ballots ids

function, constant

getDisabledValidators 3b41c359

Gets disabled notaries mining keys

outputs 0 address[] value

Array of disabled notaries mining keys

function, constant

getValidatorDisablingDate 83e51bc7

Gets notary's disabling date

inputs 0 address addr

Notary's mining key

outputs 0 uint256 value

Notary's disabling date

function, constant

getValidatorFullName 2c48fd0d

Gets notary's full name

inputs 0 address addr

Notary's mining key

outputs 0 string value

Notary's full name

function, constant

getValidatorLicenseExpiredAt 7d87283a

Gets notary's license expiration date

inputs 0 address addr

Notary's mining key

outputs 0 uint256 value

Notary's license expiration date

function, constant

getValidatorLicenseID 7d667120

Gets notary's license ID

inputs 0 address addr

Notary's mining key

outputs 0 uint256 value

Notary's license ID

function, constant

getValidatorState 5b7d6c36

Gets notary's state full name

inputs 0 address addr

Notary's mining key

outputs 0 string value

Notary's state full name

function, constant

getValidatorStreetName 5f5f43fe

Gets notary's address

inputs 0 address addr

Notary's mining key

outputs 0 string value

Notary's address

function, constant

getValidatorZip e00d1876

Gets notary's zip code

inputs 0 address addr

Notary's mining key

outputs 0 uint256 value

Notary's zip code

function, constant

getValidators b7ab4db5

Gets active notaries mining keys

outputs 0 address[] value

Array of active notaries mining keys

function, constant

getVotesAgainst b6f61f66

Gets ballot's amount of votes against

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 int256 value

Ballot's amount of votes against

function, constant

getVotesFor d40b65eb

Gets ballot's amount of votes for

inputs 0 uint256 ballotID

Ballot unique ID

outputs 0 int256 value

Ballot's amount of votes for

function, constant

initialKeys 6bbcdfcd

inputs 0 address
outputs 0 bool isNew
function, constant

miningKeys 20106959

inputs 0 address
outputs 0 bool isActive
function, constant

owner 8da5cb5b

outputs 0 address
function, constant

payoutKeys 40d0f012

inputs 0 address
outputs 0 bool isActive
function, constant

validator 223b3b7a

inputs 0 address
outputs 0 string fullName
1 string streetName
2 string state
3 uint256 zip
4 uint256 licenseID
5 uint256 licenseExpiredAt
6 uint256 disablingDate
7 string disablingTX
function, constant

validators 35aa2e44

inputs 0 uint256
outputs 0 address
function

vote c9d27afe

Votes

inputs 0 uint256 ballotID

Ballot unique ID

1 bool accept

Vote for is true, vote against is false

function, constant

votingKeys cbebcbbc

inputs 0 address
outputs 0 bool isActive
function, constant

votingLowerLimit f65fb8ab

outputs 0 uint256