=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| from collections import deque | |
| """ | |
| Both algorithms find the maximum flow in a network | |
| The Ford Fulkerson method's running time can vary significantly depending on the chosen augmenting paths | |
| which may lead to exponential performance in the worst case | |
| In contrast, Edmonds Karp always selects the shortest augmenting path (using BFS) | |
| @author Parsa Amini | |
| """ |
| 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.