Skip to main content

与当前治理时期相关的统计数据。

项目描述

Algorand 治理预言机

它是 Algorand 治理的“神谕”。

  • 主网应用 ID:will go here
  • 测试网应用程序 ID:109903471

应用状态

我们将了解如何在其他应用程序中使用应用程序状态。

开发和更新

如何创建新应用程序

from algorand_governance_oracle.deployment import create_oracle_application
from algorand_governance_oracle.clients import testnet_algod_client

private_key = "put your private key in here."

application_id = create_oracle_application(algod_client=testnet_algod_client, private_key=private_key)

print(application_id)

如何使用统计信息更新应用程序状态

from algorand_governance_oracle.api import update
from algorand_governance_oracle.clients import testnet_algod_client

private_key = "put your private key in here."
application_id = "put your application id in here."

values = {
    "period_identifier": "governance-period-4".encode(),

    "eligible_committed_stake": 3788144125919121,
    "ineligible_committed_stake": 295846447001842,

    "eligible_governor_count": 32677,
    "ineligible_governor_count": 1923,

    "algo_amount_in_reward_pool": 70500000000000,

    "updated_at": 1662985556,
}

transaction_id = update(
    algod_client=testnet_algod_client,
    private_key=private_key, 
    application_id=application_id,
    values=values,
)

print(transaction_id)

下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

algorand-governance-oracle-0.2.0.tar.gz (4.8 kB 查看哈希

已上传 source

内置分布

algorand_governance_oracle-0.2.0-py3-none-any.whl (6.0 kB 查看哈希

已上传 py3