Orakl Network Delegator
Whitelist Fee Delegation Service
Last updated
Whitelist Fee Delegation Service
Last updated
The Orakl Network Delegator is a micro-service that verify incoming transaction based on customized whitelist rules, and sign them as a fee payer when they are eligible. The code is located under .
The Orakl Network Delegator accepts transactions from registered EOAs of the Orakl Network Reporter, validates them based on customized whitelist rules, and finally signs them with a fee payer account. The Orakl Network Delegator is implemented as a REST web server, and all the transactions and related metadata are stored in the PostgreSQL database.
To sign the transaction you can use api/v1/sign
endpoint.
The first step is to add an organization name.
To add a new organization name, you can use api/v1/organization
endpoint.
Next step is to connect a reporter address with organization.
To add a new reporter, you can use api/v1/reporter
endpoint.
To add a new contract, you can use api/v1/contract
endpoint.
After adding the contract address, the next step is to define which function methods are allowed to be executed inside of specific contract address.
To add a new function name, you can use api/v1/function
endpoint.
The last step is to connect reporter with contract.
To add a new whitelist connection, you can use api/v1/contract/connectReporter
endpoint.
DATABASE_URL
PROVIDER_URL
APP_PORT
The format of
DATABASE_URL
should bepostgresql://[userspec@][hostspec][/dbname][?paramspec]
. An example string can look as followspostgresql://bisonai@localhost:5432/orakl?schema=public.
PROVIDER_URL
defines an URL string representing a JSON-RPC endpoint that listener, worker, and reporter communicate through.
APP_PORT
represents a port on which the Orakl Network Delegator will be running. This port will be necessary when we connect to Orakl Network Delegator from other services.
DELEGATOR_FEEPAYER_PK
is the private key of delegator account which signs all transactions as a fee payer.
DELEGATOR_REPORTER_PK
is the private key of reporter account makes transactions within the Orakl Network Reporter service. This private key is used only in tests.
To launch the Orakl Network Delegator from source code in the production, first build the service, and then launch it.
Once the Orakl Network Delegator is launched, we must load the privateKey
to be able able to sign transactions. privateKey
can be loaded by calling /api/v1/sign/initialize
endpoint.
After defining teporter, the next step is to add a contract address of the service to the whitelist. Currently, as well.
Before we launch the Orakl Network Delegator, we must specify . The environment variables are automatically loaded from an .env
file.
DATABASE_URL
represents a to a database that will hold the Orakl Network state.
Before launching the Orakl Network Delegator, one must add delegator's private key to privateKey
column inside of fee_payers
table. This private key will be used to sign as a fee payer.