=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| import { program } from 'commander' | |
| import * as dotenv from 'dotenv' | |
| import chalk from "chalk"; | |
| import Web3, { Wallet, Web3BaseWalletAccount } from "web3"; | |
| import { ContractAbi, Contract } from 'web3'; | |
| import fs from "fs"; | |
| dotenv.config() | |
| /* | |
| Example Commands: |
| const { Keypair, Transaction, Connection, PublicKey } = require("@solana/web3.js"); | |
| const { getAssociatedTokenAddress, createTransferCheckedInstruction, createAssociatedTokenAccountInstruction } = require("@solana/spl-token"); | |
| const { bs58 } = require("@coral-xyz/anchor/dist/cjs/utils/bytes"); | |
| const owner = 'AoE9wryGTiVPGAGJ5gZvK2NrmGbPwmKC93JfEGtEifXX' | |
| const spltoken = new PublicKey("31PA6pBcHVPgJN5QDDqHzarrkd3uGkGzYmAKigcYWurj"); | |
| const sourceWallet = Keypair.fromSecretKey(bs58.decode(owner)); | |
| const connection = new Connection("https://api.devnet.solana.com"); | |
| const destWallet = new PublicKey("ReplaceWithYourDesireDestination"); |
| import * as anchor from "@coral-xyz/anchor"; | |
| import { BN, Program, web3, SystemProgram } from "@coral-xyz/anchor"; | |
| import { StakingProgram } from "../target/types/staking_program"; | |
| import { Connection, Keypair, PublicKey } from "@solana/web3.js"; | |
| import { | |
| createMint, | |
| getOrCreateAssociatedTokenAccount, | |
| mintTo, | |
| TOKEN_PROGRAM_ID, | |
| ASSOCIATED_TOKEN_PROGRAM_ID, |
[L-1] Multi-calling the length of list in the loop at the pipeline::Pipeline.sol smart contract.
Using multi-continuous calling during a loop takes cost, especially if the function is external. Therefore, the length of the list could be arbitrary, cause increasing the number of calls.