This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import requests | |
| import base64 | |
| from eth_abi import encode | |
| PoolChainId = 1 | |
| RewardsChainId = 1 | |
| campaign = { | |
| "amount": "1000000000000000000000", | |
| "creator": "0x0000000000000000000000000000000000000000", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import csv | |
| from web3 import Web3 | |
| import time | |
| def split_list(input_list, chunk_size): | |
| # Split the list into chunks of the specified size | |
| return [input_list[i:i + chunk_size] for i in range(0, len(input_list), chunk_size)] | |
| # Define the path to the CSV file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Address of Pyth contract | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/evm#mainnet] | |
| pythNetworkAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6" # Ethereum Mainnet address | |
| # debug mode | |
| debug: true | |
| # Refresh rate of config in seconds to prevent rate limiting from github | |
| configRefreshRateInSeconds: 3600 | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/price-service#public-endpoints] | |
| priceServiceEndpoint: "https://hermes.pyth.network" | |
| # maximum number of seconds between updates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // web3-functions/pyth-oracle-w3f-priceIds/index.ts | |
| import { | |
| Web3Function | |
| } from "@gelatonetwork/web3-functions-sdk"; | |
| import { Contract } from "ethers"; | |
| import { EvmPriceServiceConnection as EvmPriceServiceConnection2 } from "@pythnetwork/pyth-evm-js"; | |
| import PythAbi from "@pythnetwork/pyth-sdk-solidity/abis/IPyth.json"; | |
| // web3-functions/pyth-oracle-w3f-priceIds/pythUtils.ts | |
| import { Octokit } from "octokit"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Address of Pyth contract | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/evm#mainnet] | |
| pythNetworkAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6" # Ethereum Mainnet address | |
| # debug mode | |
| debug: true | |
| # Refresh rate of config in seconds to prevent rate limiting from github | |
| configRefreshRateInSeconds: 3600 | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/price-service#public-endpoints] | |
| priceServiceEndpoint: "https://hermes.pyth.network" | |
| # maximum number of seconds between updates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { utils, providers, Contract } from "ethers"; | |
| // Output type | |
| type Fees = { | |
| xFeeMint: number[], | |
| yFeeMint: number[], | |
| xFeeBurn: number[], | |
| yFeeBurn: number[] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example test : | |
| enum QuoteType { | |
| MintExactInput, | |
| MintExactOutput, | |
| BurnExactInput, | |
| BurnExactOutput | |
| } | |
| const testFees = { | |
| xFeeMint: [0.0000,0.4000,0.4500,0.7000], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum QuoteType { | |
| MintExactInput, | |
| MintExactOutput, | |
| BurnExactInput, | |
| BurnExactOutput | |
| } | |
| type Fees = { | |
| xFeeMint: number[], | |
| yFeeMint: number[], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Address of Pyth contract | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/evm#mainnet] | |
| pythNetworkAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6" # Ethereum Mainnet address | |
| # debug mode | |
| debug: true | |
| # Refresh rate of config in seconds to prevent rate limiting from github | |
| configRefreshRateInSeconds: 3600 | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/price-service#public-endpoints] | |
| priceServiceEndpoint: "https://hermes.pyth.network" | |
| # maximum number of seconds between updates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Address of Pyth contract | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/evm#mainnet] | |
| pythNetworkAddress: "0x4305FB66699C3B2702D4d05CF36551390A4c69C6" # Ethereum Mainnet address | |
| # debug mode | |
| debug: true | |
| # Refresh rate of config in seconds to prevent rate limiting from github | |
| configRefreshRateInSeconds: 3600 | |
| # See [https://docs.pyth.network/documentation/pythnet-price-feeds/price-service#public-endpoints] | |
| priceServiceEndpoint: "https://hermes.pyth.network/" | |
| # maximum number of seconds between updates |