Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wavesenterprise/dao-contract-api

Package Overview
Dependencies
Maintainers
9
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wavesenterprise/dao-contract-api

Обертка над voting-blockchain-tools для взаимодействия с dao контрактом.

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

Dao contract api

Обертка над voting-blockchain-tools для взаимодействия с dao контрактом.

Опции

{
  ransactionBroadcaster: TransactionBroadcaster,# transaction broadcastes from voting-blockchain-tools
  keyPair: IKeyPair, # public and private key to sign transaction
  nodeAddress: string, # address to node
  axiosInstance?: AxiosInstance, # authorized axios with "Authorization" header
  isWaitTransactionMining?: boolean, # wheter to resolve right after sending or wait mining. Default: true
  statusResponseTimeout?: number, # wait mining max time. Default: 100000
  maxMiningAttempts?: number | null, # max mining errors from nodes to stop mining. Default: 3
  feeAssetId?: string | null, # asset id to pay commission fee. Default: null
}

Примеры

Примеры использования библиотеки можно найти в папке examples

Изменение contractImage запущенного голосования

  1. Создать .env файл в корне проекта с содержимым:
# node address
NODE_ADDRESS=https://voting-volgograd.welocal.dev/nodeAddress

# auth service address
AUTH_SERVICE_ADDRESS=https://voting-volgograd.welocal.dev/authServiceAddress
AUTH_SERVICE_SECRET_KEY=secret

# Ключ отправителя транзакции
PRIVATE_KEY=7GGyPVkdZe1P6XmiCwwEVqtsjMCYqTxvawQL4eeaH7JY
PUBLIC_KEY=9d5PyQqUnqTTETDBzejT4AAaSC5A6dMa1n7ShRxtne8TsfGxefD4WfZajX5LBA76eNAQbDQsa1RX8Z6M53nphFj

# Как в настройках decrypt-service. Можно также не указывать или оставить "WAVES" для дефолта.
TRANSACTION_FEE_ASSET_ID = WAVES

# txid контракта
CONTRACT_ID=Hc8tcraetYFqTYJJ4iVk1a8SWK1SNbVM8VUNheNB9HF9

CONTRACT_IMAGE=registry.vostokservices.com/voting/voting-contract:cumulative-voting-0.2
CONTRACT_IMAGE_HASH=1f24e814e598114c5f0000373a43bc358beb7ea42b4d05064b1f1694248ddca2
  1. Настроить .env. Не забыть поменять AUTH_SERVICE_SECRET_KEY
  2. Установить зависимости через npm i
  3. Запустить команду npx ts-node examples/updateContractImage.ts
  4. Проверть, что операция прошла успешно, можно через свагер ноды https://voting-volgograd.welocal.dev/node-0/api-docs/index.html#/contracts/getContractInfo

FAQs

Package last updated on 28 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc