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
| export const createMint = async () => { | |
| const raydium = await initSdk() | |
| const programId = DEVNET_PROGRAM_ID.LAUNCHPAD_PROGRAM // devent: DEVNET_PROGRAM_ID.LAUNCHPAD_PROGRAM | |
| // тут можно переберать адреса пока не получите тот что нужен | |
| const pair = Keypair.generate() | |
| const mintA = pair.publicKey | |
| const configId = getPdaLaunchpadConfigId(programId, NATIVE_MINT, 0, 0).publicKey |
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
| { | |
| "config": { | |
| "chainId": 42, | |
| "homesteadBlock": 0, | |
| "eip150Block": 0, | |
| "eip155Block": 0, | |
| "eip158Block": 0, | |
| "byzantiumBlock": 0, | |
| "constantinopleBlock": 0, | |
| "petersburgBlock": 0, |
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
| // Frontend | |
| import { useGoogleReCaptcha } from 'react-google-recaptcha-v3'; | |
| import { useEffect } from 'react'; | |
| export const Recaptcha = () => { | |
| const { executeRecaptcha } = useGoogleReCaptcha(); | |
| const { fetch: originalFetch } = window; | |
| const handleReCaptchaVerify = async () => { | |
| try { |
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
| # curl -X POST https://rpc.berachain.com -H "Content-Type: application/json" -d '{ | |
| # "jsonrpc": "2.0", | |
| # "id": 1, | |
| # "method": "eth_call", | |
| # "params": [ | |
| # { | |
| # "to": "<ADDRESS_OF_SMART_CONTRACT>", | |
| # "data": "<HEX_ENCODED_CALL_DATA>" | |
| # }, | |
| # "latest" |
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 { useState, useEffect } from 'react'; | |
| const usePolling = (url, interval = 5000) => { | |
| const [data, setData] = useState(null); | |
| const [isFetching, setIsFetching] = useState(true); | |
| useEffect(() => { | |
| let isMounted = true; | |
| let timerId; |
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
| use borsh::{BorshSerialize, BorshDeserialize}; | |
| use solana_program::{ | |
| account_info::{next_account_info, AccountInfo}, | |
| entrypoint, | |
| msg, | |
| entrypoint::ProgramResult, | |
| program_error::ProgramError, | |
| pubkey::Pubkey, | |
| }; |
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
| use borsh::{BorshSerialize, BorshDeserialize}; | |
| use solana_program::{ | |
| account_info::{next_account_info, AccountInfo}, | |
| entrypoint, | |
| msg, | |
| entrypoint::ProgramResult, | |
| program_error::ProgramError, | |
| pubkey::Pubkey, | |
| }; |
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
| const express = require('express'); | |
| const app = express(); | |
| const port = 3000; | |
| app.get('/v1/health', (req, res) => { | |
| res.send('Hello, Clockwise software!'); | |
| }); | |
| app.listen(port, () => { | |
| console.log(`Server running on http://localhost:${port}`); |