Skip to content

arr00/dot-vote-relayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dot-Vote-Relayer

Dot-Vote-Relayer relays signatures created on a Dot-Vote website. To use Dot-Vote-Relayer, import the relayer to your file using const { Relayer } = require("dot-vote-relayer");.

Create a config for your relayer which contains the following fields:

  • ethRpcUrl - String
  • mongoDbUrl - String
  • governorAddress - Address
  • tokenAddress - Address
  • governorVoteFunction - String
  • governorGetProposalFunction - String
  • governorGetReceiptFunction - String
  • relayerPk - String
  • notificationHook - String
  • relayAtBlocks - array of integers

There is also an optional notificationHook field which can be used to send telegram notifications.

The ABI for your governor and governance token must be placed in the root directory and be named governor.abi and token.abi.

Then start your relayer as follows:

const relayer = new Relayer(config);
relayer.start();

For an example integration, see dydx-relayer.