Skip to content

Commit

Permalink
Merge pull request #27 from valory-xyz/fix/configure-allowed-chains
Browse files Browse the repository at this point in the history
fix: make allowed chains configurable
  • Loading branch information
Divya-Solulab authored Oct 22, 2024
2 parents dd043bf + 0f4e26a commit 3e898d7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,12 @@ f162f6e9ce964277d59ff703f905ce4d7e514339:packages/valory/contracts/staking_token
293094bdd1180c1f29da321ab6ffc9f661e00d17:packages/valory/contracts/staking_token/contract.yaml:generic-api-key:10
d82b489e8772df10d476d6ebb3fb6527e525e1cf:packages/valory/contracts/staking_token/contract.yaml:generic-api-key:10
c44680132c9ee15749aa0e9b78e68de64c8012a6:packages/valory/skills/liquidity_trader_abci/behaviours.py:generic-api-key:2921
c1df2c40d616f55da657d42be6aaeb9d5569772d:packages/valory/agents/optimus/aea-config.yaml:generic-api-key:146
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/abstract_round_abci/tests/data/dummy_abci/skill.yaml:generic-api-key:73
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/market_data_fetcher_abci/skill.yaml:generic-api-key:78
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/portfolio_tracker_abci/skill.yaml:generic-api-key:80
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/registration_abci/skill.yaml:generic-api-key:86
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/reset_pause_abci/skill.yaml:generic-api-key:80
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/strategy_evaluator_abci/skill.yaml:generic-api-key:101
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/trader_decision_maker_abci/skill.yaml:generic-api-key:76
c022bdff65530d1dc6a037b3d173e3989a51daec:packages/valory/skills/transaction_settlement_abci/skill.yaml:generic-api-key:93
2 changes: 1 addition & 1 deletion packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"skill/valory/liquidity_trader_abci/0.1.0": "bafybeihtca6gtyjibj6wkrcdmx3fb3a3bkpdgsphwevkatagxrbqvh6fd4",
"skill/valory/optimus_abci/0.1.0": "bafybeifjpvqz2m7qhztib4xcjpbjkuiutrot22flqclg36amvqvrp5ra3e",
"agent/valory/optimus/0.1.0": "bafybeida2scmw3qune3n6ru7tuzquuc3mxs2cfivzcncrtlj4ziadv4sqy",
"service/valory/optimus/0.1.0": "bafybeibiiuhqronhgkxjo7x5xve24lkbqom5rqcjxg7vrl6jwavfyypmhu"
"service/valory/optimus/0.1.0": "bafybeidlfxklqbwrba5xdbigchkl5dcqcrlpzbrkem62jbzr5yghwe7tgu"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand Down
1 change: 1 addition & 0 deletions packages/valory/services/optimus/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ models:
max_fee_percentage: ${MAX_FEE_PERCENTAGE:float:0.02}
max_gas_percentage: ${MAX_GAS_PERCENTAGE:float:0.25}
balancer_graphql_endpoints: ${BALANCER_GRAPHQL_ENDPOINTS:str:{"optimism":"https://api.studio.thegraph.com/query/75376/balancer-optimism-v2/version/latest","base":"https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest"}}
allowed_chains: ${ALLOWED_CHAINS:list:["optimism","base"]}
coingecko:
args:
token_price_endpoint: ${COINGECKO_TOKEN_PRICE_ENDPOINT:str:https://api.coingecko.com/api/v3/simple/token_price/{asset_platform_id}?contract_addresses={token_address}&vs_currencies=usd}
Expand Down
4 changes: 4 additions & 0 deletions scripts/aea-config-replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def main() -> None:
"api_key"
] = f"${{str:{os.getenv('COINGECKO_API_KEY')}}}"

config[5]["models"]["params"]["args"][
"allowed_chains"
] = f"${{list:{os.getenv('ALLOWED_CHAINS')}}}"

with open(Path("optimus", "aea-config.yaml"), "w", encoding="utf-8") as file:
yaml.dump_all(config, file, sort_keys=False)

Expand Down

0 comments on commit 3e898d7

Please sign in to comment.