Skip to content

Instantly share code, notes, and snippets.

View ilyar's full-sized avatar
🖖
this is the way

ilyar

🖖
this is the way
View GitHub Profile
@ilyar
ilyar / use-daedalus-socket-cardano-cli.sh
Last active February 21, 2023 09:27
Use Daedalus socket for cardano-cli for Mainnet or Testnet the Cardano
#!/usr/bin/env bash
# Install cardano-cli or use docker https://gist.github.com/ilyar/bf4c2346be1a74c50e488181986808fb
#
# Linux https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished
# Win64 https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-win64/latest-finished
# Macos https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-macos/latest-finished
# Extcact only cardano-cli into /usr/local/bin/cardano-cli
# Check
cardano-cli --version
@ilyar
ilyar / use-daedalus-socket-docker-cardano-cli.sh
Last active October 24, 2022 14:19
Use Daedalus socket for cardano-cli via Docker for Mainnet or Testnet the Cardano
#!/usr/bin/env bash
#########################################
# Daedalus Wallet for the Cardano Testnet
# Download https://developers.cardano.org/en/testnets/cardano/get-started/wallet/
# Run Daedalus for Testnet
# Create var CARDANO_NODE_SOCKET_PATH
export CARDANO_NODE_SOCKET_PATH=$(ps ax | grep -v grep | grep cardano-wallet | grep testnet | sed -E 's/(.*)node-socket //')
#!/usr/bin/env bash
# HTTPie—aitch-tee-tee-pie—is a user-friendly command-line HTTP client for the API https://httpie.io/
# demo: https://httpie.io/run
apt-get install httpie
# WABT: The WebAssembly Binary Toolkit https://github.com/WebAssembly/wabt
# demo: https://webassembly.github.io/wabt/demo/
apt-get install wabt
import * as near from '@4ire-labs/near-sdk' // const near = require('@4ire-labs/near-sdk')
process.env.NEAR_ENV = 'testnet'
async function main() {
const account = await near.readUnencryptedFileSystemKeyStore(near.accountIdBySlug('ilyar'))
console.log(account)
console.log('Account:', {
implicitId: account.accountId,
publicKey: account.keyPair.publicKey.toString(),

Near protocol [edit]

SDK Collection Types

AssemblyScript

Type Read Write Delete Search Move Clear Iter Purge Order Range
PersistentVector O(1) O(1)* O(1)** O(n) O(n) O(n)
PersistentSet O(1) O(1) O(1) O(1) O(n) O(n)

Contributing

This agreement is for collaboration, it may not be detailed enough, if it is not clear how to do what you want, this is a normal situation, just ask your colleagues.

Tech

TBD

Main flow

@ilyar
ilyar / clear_state_of_contract_on_near_protocol.md
Last active May 28, 2025 08:46
How do clear the state of a contract on Near protocol?

How do clear the state of a contract on Near protocol?

Prepare

source neardev/dev-account.env
export CONTRACT_NAME=$CONTRACT_NAME

View state

Everscale contract verify

Prerequisite

  • Node.js >= 14.x installed
  • tvm_verify.sh wget --quiet https://raw.githubusercontent.com/ilyar/everscale-lab/main/util/tvm_verify.sh

SafeMultisigWallet