index

Main Fn

· 1min

Notes

contact interaction (read)

import * as Contract from "chanmges/to/your/packages/location"

...

const totalTx = await contract.get_total_raised();

... convert smart contract type data to TS/JS

contract interaction (write)


import * as Contract from "chanmges/to/your/packages/location"

const tx = await contract.donate({
    ...params_for_contract
  });


// app/hooks/use-submit-transaction.ts

const builtTxXDR = tx.toXDR();
const signedXDR = await signTransaction(builtTxXDR);

const server = new rpc.Server("http://your-rpc-url");
const sentTx = await server.sendTransaction(
  TransactionBuilder.fromXDR(signedXDR.signedTxXdr, options.networkPassphrase)
);

Publishing packages while its already fixed logic/contract

create an account at npmjs.com, shud configure 2FA

adding user to your terminal

npm adduser

build the packages first

npm run build

then, ready to publish

npm publish --access public

Network problems

recommended: https://stellar-soroban-testnet-public.nodies.app

RPC list: https://developers.stellar.org/docs/data/apis/api-providers

usage:

stellar network add --rpc-url <your_url> --network-passphrase testnet <rpc_name>

example:

stellar network add --rpc-url https://stellar-soroban-testnet-public.nodies.app --network-passphrase testnet nodies_testnet

after adding, you could:

stellar network use <NAME>

example:

stellar network use nodies_testnet

after all, you can check your rpc health

stellar network health

expected:

✅ Healthy
ℹ️  Latest ledger: 1xxxxxxxx

Harapannya bisa push ke repo masing masing, lalu kalian bisa register di https://www.risein.com/bootcamps/build-on-stellar-bootcamp-indonesia

bantu om Ron fullfill the KPI