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
ffd2ae04-f849-4f59-860b-6215ec77bb4f |
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
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
contract StaccStaccs is ERC721URIStorage, Ownable { |
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
// put this in this dir https://github.com/metaplex-foundation/metaplex-program-library/blob/master/fixed-price-sale/js/test/buy.test.ts | |
import test from 'tape'; | |
import { killStuckProcess, logDebug, sleep } from './utils'; | |
import { | |
createStore, | |
createPrerequisites, | |
initSellingResource, | |
createMarket, | |
mintTokenToAccount, |
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 { Connection, Keypair, PublicKey } from "@solana/web3.js"; | |
import { NodeWallet } from "@project-serum/common"; | |
import { getOrCreateAssociatedTokenAccount } from "@solana/spl-token"; | |
import fs from "fs"; | |
import { | |
StreamClient, | |
Stream, | |
CreateParams, | |
CreateMultiParams, | |
WithdrawParams, |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2ERC20.sol'; | |
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; | |
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; | |
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; | |
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; |
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
var express = require("express"); | |
var bodyParser = require("body-parser"); | |
var cors = require("cors"); | |
var app = express(); | |
app.use(bodyParser()); | |
app.use(cors()); | |
var reservePairs = {}; | |
app.post("/", async function (req, res) { | |
if (req.body.fee > 5000) { |
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 SOLANA_KEY=yaddayadda |
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
setx SOLANA_KEY yaddayadda |
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
npm i @coral-xyz/anchor @solana/web3.js @project-serum/common @orca-so/whirlpools-sdk @orca-so/sdk |
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
let connection = new Connection ("https://rpc.helius.xyz/?api-key=helius-is-cool") | |
// @ts-ignore | |
const fetcher = new AccountFetcher(connection); | |
// @ts-ignore | |
const provider = new AnchorProvider( connection, new NodeWallet(Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_KEY!))), {}) | |
// @ts-ignore | |
const ctx = WhirlpoolContext.from(connection, new NodeWallet(Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_KEY!))),ORCA_WHIRLPOOL_PROGRAM_ID,fetcher)// (provider, ORCA_WHIRLPOOL_PROGRAM_ID); |