Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CCO2 price feed bot based on KLIMA/CCO2 pool #72

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

0xAurelius
Copy link
Collaborator

No description provided.

@0xAurelius
Copy link
Collaborator Author

works as expected in staging

@@ -41,6 +41,8 @@ def token_supply(web3, token_address, abi, decimals):
)

try:
if decimals is None:
decimals = contract.functions.decimals().call()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically we can't always assume that there's a decimals function to call on an ERC20, but in this case it should be fine since the tokens we are tracking all have the function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's why I made it optional

Either we can specify it manually, or if not specified manually we try calling from the decimals function

@0xAurelius 0xAurelius merged commit 060b3bf into KlimaDAO:main Jan 22, 2024
2 checks passed
@0xAurelius 0xAurelius deleted the add-cco2-price-feed branch January 22, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants