... let thread_pool = Arc::new(ThreadPool::default());
// Create and submit a task
let task = Task::new(my_task(1), 1);
let handle = thread_pool.submit(task).await.unwrap();
// Wait for the result
let result = handle.await_result().await;
println!("Task resul...
...onst program = anchor.workspace.ExampleMap as Program;
it("Initialize and set value", async () => {
const key = new anchor.BN(42);
const value = new anchor.BN(1337);
const seeds = [key.toArrayLike(Buffer, "le", 8)];
let valueAccount = anchor.web3.PublicKey.findProgramAddre...
...he json of the contract which you want to interact
// You can use any standard network name
// - "homestead"
// - "rinkeby"
// - "ropsten"
// - "kovan"
// - "goerli"
const provider = ethers.getDefaultProvider(config['network']);
// Make a wallet instance using private key and provid...
...b mod solana_business_card {
use super::*;
// Our instruction handler! It sets the user's favorite number and color
pub fn set_favorites(
context: Context,
number: u64,
color: String,
hobbies: Vec,
) -> Result {
let user_public_key =...