Chain: IOTA Testnet
Hello. I am preparing to use Pyth in our application on the IOTA chain. I want to send prices on the IOTA testnet to be able source them in my off-chain application that sources other data from the IOTA network as well as in my contracts deployed into IOTA.
We used Pyth on EVM chains a lot in the past.
Is it possible to use price-pusher to push oracle updates on IOTA network?
I have the following config;
- alias: BTC/USD
id: e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43
time_difference: 60
price_deviation: 0.5
confidence_ratio: 1
Then I have the following command to start the price pusher:
docker run --rm \
--entrypoint=npm \
--workdir /srv \
-v $(pwd)/mnemonic:/mnemonic \
-v $(pwd)/config.yaml:/app/config.yaml \
public.ecr.aws/pyth-network/xc-price-pusher:v10.3.1 -- start iota \
--endpoint http://iota-testnet-arm64-3.abc.xyz:9000 \
--pyth-package-id 0x23994dd119480ea614f7623520337058dca913cb1bb6e5d8d51c7b067d3ca3bb \
--pyth-state-id 0x68dda579251917b3db28e35c4df495c6e664ccc085ede867a9b773c8ebedc2c1 \
--wormhole-package-id 0xfca58c557f09cddb7930588c4e2a4edbe3cdded1ac1ed2270aa2dfa8d2b9ae0d \
--wormhole-state-id 0x8bc490f69520a97ca1b3de864c96aa2265a0cf5d90f5f3f016b2eddf0cf2af2b \
--price-service-endpoint https://hermes.pyth.network \
--mnemonic-file /mnemonic \
--price-config-file /app/config.yaml
We are getting the following error:
JsonRpcError: Method not found
at SuiHTTPTransport.request (/srv/node_modules/.pnpm/@mysten+sui@1.26.1_typescript@5.9.3/node_modules/@mysten/sui/dist/cjs/client/http-transport.js:81:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async SuiClient.getCoins (/srv/node_modules/.pnpm/@mysten+sui@1.26.1_typescript@5.9.3/node_modules/@mysten/sui/dist/cjs/client/client.js:64:12)
at async SuiPricePusher.getAllGasCoins (/srv/dist/sui/sui.cjs:248:36)
at async SuiPricePusher.mergeGasCoinsIntoOne (/srv/dist/sui/sui.cjs:298:26)
at async SuiPricePusher.initializeGasPool (/srv/dist/sui/sui.cjs:206:34)
at async SuiPricePusher.createWithAutomaticGasPool (/srv/dist/sui/sui.cjs:121:25)
at async Object.handler (/srv/dist/sui/command.cjs:164:27) {
code: -32601,
type: 'MethodNotFound'
}
It fails on the following code:
static async getAllGasCoins(provider, owner) {
let hasNextPage = true;
let cursor;
const coins = new Set(\[\]);
let numCoins = 0;
while(hasNextPage){
const paginatedCoins = await provider.getCoins({ <<<<<--- in this line
owner,
cursor
});
numCoins += paginatedCoins.data.length;
for (const c of paginatedCoins.data)coins.add(JSON.stringify({
objectId: c.coinObjectId,
version: c.version,
digest: c.digest
The IOTA node I use is correct one:
curl -X POST --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"iota_getLatestCheckpointSequenceNumber","params":[]}' http://iota-testnet-arm64-3.abc.xyz:9000
{"jsonrpc":"2.0","id":1,"result":"149805380"}