-
Notifications
You must be signed in to change notification settings - Fork 209
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
feat(target_chains/ethereum): add arbirum stylus sdk #2041
base: main
Are you sure you want to change the base?
Conversation
v1.9.3
@Ifechukwudaniel is attempting to deploy a commit to the Pyth Network Team on Vercel. A member of the Team first needs to authorize it. |
This is an early draft of the Pyth stylus SDK. Using external calls. I am working on the examples |
v1.9.4
Co-authored-by: Pavel Strakhov <[email protected]>
Co-authored-by: Pavel Strakhov <[email protected]>
Co-authored-by: Pavel Strakhov <[email protected]>
Co-authored-by: Pavel Strakhov <[email protected]>
The issue with this approach is the return type. The sol_interface! {} does not support custom types like PriceFeed or Price. Using just Price will look like this: struct Price {
int64 price;
uint64 conf;
int32 expo;
uint publish_time;
}
struct PriceFeed {
bytes32 id;
Price price;
Price ema_price;
} The interface will look like sol_interface! {
interface IPyth {
function getEmaPriceNoOlderThan(
bytes32 id,
uint age
) external view returns (int64,uint64,uint32, unit);
function parsePriceFeedUpdates(
bytes[] calldata updateData,
bytes32[] calldata priceIds,
uint64 minPublishTime,
uint64 maxPublishTime
) external payable returns (PriceFeed[] memory priceFeeds);
}
} getEmaPriceNoOlderThan wors because the return type is not complicated |
merge main
I’m currently working on the early draft of the Stylus SDK, focusing on documentation, writing examples, and conducting end-to-end testing for the SDK