hirosystems / stacks-pyth-bridge

Retrieve trading pairs (BTC-USD, STX-USD, etc) from Clarity smart contracts.
Apache License 2.0
12 stars 6 forks source link

feat: add decode-price-feeds to oracle #31

Closed lgalabru closed 10 months ago

lgalabru commented 10 months ago

Addressing https://github.com/hirosystems/stacks-pyth-bridge/issues/30 - this function is adding the ability for the oracle to decode PNAU messages without updating the price feed store. Note that this is a contract upgrade, so a PTGM message, upgrading the contract will have to be issued after the deployment.

As discussed, we're also getting rid of the helper contract.

jakob-btc commented 10 months ago

Thanks for the quick turnaround @lgalabru.

@ali-bahjati - can you give me a rough estimate of when we should expect this on mainnet? We are waiting for this upgrade before integrating Pyth into our contracts.

jakob-btc commented 10 months ago

@ali-bahjati - an understanding of the ETA for this PR to get merged would be very helpful to us. This is a key dependency for us to use Pyth on mainnet.

We can deploy the new contracts ourselves but would rather use the official release by you.

ali-bahjati commented 10 months ago

Hi @gandalf77, Sorry for my delay here. I will address this and make sure it is deployed early next week (the coming Monday/Tuesday). Would that work for you?

jakob-btc commented 10 months ago

That works, thanks @ali-bahjati!

jakob-btc commented 10 months ago

Hey @ali-bahjati - can you please ping me here when the new contracts are deployed? Thank you.

Patotking12 commented 8 months ago

@gandalf77 have you been able to make the Pyth Oracle work in your smart Contracts?

jakob-btc commented 8 months ago

@lgalabru, @ali-bahjati

When I call decode-price-feeds in pyth-oracle-v2 from our contracts like so

Screenshot from 2024-02-18 16-03-15

I get (err u4004) which I assume is ERR_UNAUTHORIZED_ACCESS from the .pyth-governance-v1 contract.

How can I remedy this? Are the contracts setup to be called by other contracts, since you're using contract-caller instead of tx-sender?

jakob-btc commented 8 months ago

@gandalf77 have you been able to make the Pyth Oracle work in your smart Contracts?

Not yet, no. Have you?

jakob-btc commented 8 months ago

@Patotking12 - we got Pyth to work in our contracts. Reach out on Discord (@jakob_btc) if you need help with your implementation.