Solana, TypeScript, Angular Developer Needed

Devam Ediyor İlan edilme: 7 ay önce Teslim sırasında ödenir
Devam Ediyor Teslim sırasında ödenir

We have an issue with Solana Smart contract calling its method. You will just need to provide a solution for the below issue.

Smart contract snippet in RUST:

pub fn deposit(ctx: Context, amount: u64) -> Result {

let distribution_account = &ctx.accounts.distribution_account;

let mut total_percentage = 0;

for i in 0..5 {

total_percentage += [login to view URL][i];

}

if total_percentage != 100 {

return Err(ProgramError::[login to view URL]());

}

for i in 0..5 {

let receiver_amount = amount * [login to view URL][i] as u64 / 100;

let ix = system_instruction::transfer(

&[login to view URL](),

&[login to view URL][i],

receiver_amount,

);

invoke(

&ix,

&[

ctx.accounts.payer.to_account_info(),

ctx.accounts.system_program.to_account_info(),

],

)?;

}

emit!(PaymentEvent {

payer: [login to view URL](),

amount: amount,

});

Ok(())

}

#[derive(Accounts)]

pub struct TakePayment,

#[account(mut)]

pub distribution_account: Account,

}

Client Typescript code:

import { Connection, PublicKey, Transaction, SystemProgram, clusterApiUrl, Keypair} from '@solana/[login to view URL]';

import * as anchor from "@coral-xyz/anchor";

import { AnchorProvider, Program, BN, workspace } from "@coral-xyz/anchor";

import { HelloAnchor } from "./target/types/helloanchor";

import idl from './target/idl/[login to view URL]';

import { Buffer } from 'buffer';

const SOLANA_HOST = clusterApiUrl("devnet")

connection = new Connection(SOLANA_HOST, 'confirmed');

const provider = new AnchorProvider(connection, [login to view URL], {

preflightCommitment: 'processed'

});

program = new Program(idl as any, provider);

let distributionAccountPubKey = new PublicKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

const depositamount = new BN(1);

[login to view URL](depositamount);

const transaction = await [login to view URL]

.deposit(depositamount)

.accounts({

distributionAccount: distributionAccountPubKey,

payer: [login to view URL],

systemProgram: [login to view URL],

})

// .signers([newAccountKp])

.transaction();

[login to view URL] = [login to view URL];

// Log the transaction to verify it

[login to view URL]('Transaction:', transaction);

const { value: { err } } = await [login to view URL](transaction);

if (err) {

[login to view URL]('Transaction simulation failed:', err);

return;

}

This code gives error: "InvalidArgument"

AngularJS Node.js JavaScript Rust Solana Typescript

Proje NO: #38168708

Proje hakkında

14 teklif Uzak proje Aktif 7 ay önce

Seçilen:

(8 Değerlendirme)
4.1

Bu iş için 14 freelancer ortalamada $53 teklif veriyor

tangramua

Hello, We carefully studied the description of your project and we can confirm that we understand your needs and are also interested in your project. Our team has the necessary resources to start your project as soon Daha Fazla

$70 USD in 7 gün içinde
(66 Değerlendirme)
7.6
einnovention

In a field filled with countless freelancers, my team at Einnovention stands out for our impeccable track record and customer satisfaction rate. We are specialists in the latest frameworks and languages like TypeScript Daha Fazla

$50 USD in 7 gün içinde
(27 Değerlendirme)
6.2
chwaqas5434

As a TypeScript developer with a keen eye for detail, I understand some of the nuances and complexities that can arise when working with smart contracts. I have worked extensively in blockchain development and am well- Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(6 Değerlendirme)
4.2
abdullahmaqsoo58

Hello, I have carefully read your project requirements, and I am sure, I can fulfill your requirements and get the desired results. I am ready to start the project right away. Regards, H. Abdullah Maqsood.

$50 USD in 4 gün içinde
(2 Değerlendirme)
3.2
gvkundalwal

Hello I have carefully reviewed your requirements for “Solana, TypeScript, Angular Developer Needed ”. I have 5 years of experience in Web, Desktop, and Mobile applications development, specializing in Website Design Daha Fazla

$50 USD in 7 gün içinde
(2 Değerlendirme)
2.6
amirkhan549181

Hey Aaron, I understand that you are facing an issue with the Solana smart contract method 'deposit' in Rust. The error message 'InvalidArgument' is being thrown, which indicates that the total percentage calculation Daha Fazla

$50 USD in 7 gün içinde
(4 Değerlendirme)
2.2
Imiramnaz

With a wealth of experience in the IT industry, I have actively honed my skills in AngularJS, JavaScript, and Node.js over the last 15 years. As an IT consultant, I have accomplished over 300 projects, many of which en Daha Fazla

$70 USD in 7 gün içinde
(0 Değerlendirme)
0.0