A decentralized autonomous service that manages betting games comparing token holder counts between Arbitrum and Base networks using Olas framework and Open Autonomy.
This agent service facilitates a decentralized betting game where:
- Users can place bets on which chain has more token holders - Arbitrum or Base
- Agent service automatically:
- Fetches current holder counts from Blockscout APIs
- Determines winners based on actual holder numbers
- Calculates prizes proportional to holder count differences
- Executes prize payments and bet resolution transactions using Safe multisig
- BETCHAIN_CONTRACT_ADDRESS=0x8209b8E7C2585D3Ac6F7DfEE462b6f166B71e1bE
Key Components:
DataPullBehaviour
- Data fetchingDecisionMakingBehaviour
- Winner determinationTxPreparationBehaviour
- Transaction handlingBetChain
- Smart contract interfaceLearningAbciApp
- ABCI state machine
- Python
>=3.10
- Tendermint
==0.34.19
- IPFS node
==0.6.0
- Poetry
- Docker Engine & Docker Compose
git clone https://github.com/akshat-solulab/academy-learning-service.git
cd academy-learning-agent
poetry shell
poetry install
autonomy packages sync --update-packages
autonomy generate-key ethereum -n 4
- Setup environment:
cp sample.env .env
- Configure variables:
ALL_PARTICIPANTS=["0xB953...74"]
GNOSIS_LEDGER_RPC=https://...
TRANSFER_TARGET_ADDRESS=0x...
SAFE_CONTRACT_ADDRESS=0x...
SAFE_CONTRACT_ADDRESS_SINGLE=0x...
BETCHAIN_CONTRACT_ADDRESS=0x...
Single Agent:
bash run_agent.sh
Full Service (4 Agents):
bash run_service.sh
Monitor logs:
docker logs -f learningservice_abci_0
Apache License 2.0