Skip to content

Instantly share code, notes, and snippets.

@koxu1996
koxu1996 / config.json
Created January 25, 2022 14:08
Particles.js config
{
"particles":{
"number":{
"value":80,
"density":{
"enable":true,
"value_area":800
}
},
"color":{

Balance check with Casper JS SDK

This is long demonstration of checking account balance, with the backend usage of JavaScript SDK.

Note: we used extra steps to avoid silent failure that can happen in CasperClient.balanceOfByPublicKey().

Steps

  1. Create project directory
@koxu1996
koxu1996 / call-batch-entrypoint.sh
Last active May 14, 2024 10:06
[Kairos] Test environment for periodic L1 synchronization
#!/usr/bin/env sh
set -e
CONTRACT_HASH_RAW="$1"
echo "> Calling 'batch' entrypoint."
DEPLOY_HASH=$(casper-client put-deploy \
--node-address http://127.0.0.1:11101/rpc \
--chain-name casper-net-1 \
--payment-amount 9991000000000 \
@koxu1996
koxu1996 / Cargo.toml
Created June 12, 2024 09:01
Casper's smart contract example - no bullshit, just stable Rust and no_std
[package]
name = "casper-example-contract"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
casper-contract = { version = "4.0.0", default-features = false }