It is markdown version, original: https://solana.com/hackathon-grizzlython-official-rules-2023.pdf
Official Rules
NO PURCHASE NECESSARY
Источник https://www.forth.org.ru/~ac/rationale/FORTH.TXT | |
Слово о Форте. Андрей Черезов ac@forth.org | |
Попытка формализации сути языка :) 29.07.1999 | |
1. Форт-система | |
Традиционная форт-система состоит из двух частей: исполняющая среда (её | |
часто назвают VFM - виртуальная форт-машина) и транслятор. Транслятор | |
занимается поглощением исходных текстов программ (и что-то при этом | |
производит, о чем позже), VFM занимается выполнением программного кода. |
{ | |
"ABI version": 2, | |
"version": "2.3", | |
"header": ["pubkey", "time", "expire"], | |
"functions": [ | |
{ | |
"id": "0x00000000", | |
"name": "transfer", | |
"inputs": [ | |
{ |
#!/usr/bin/env bash | |
std_lib() { | |
list=() | |
list+=('"SETCP0":"FF00"') | |
list+=('"ACCEPT":"F800"') | |
list+=('"THROW":"F22"') | |
list+=('"PUSHREF":"88"') | |
list+=('"SETCODE":"FB04"') | |
opcodes=$(printf ",%s" "${list[@]}") |
It is markdown version, original: https://solana.com/hackathon-grizzlython-official-rules-2023.pdf
Official Rules
NO PURCHASE NECESSARY
@startuml | |
' configures the library | |
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/v9.4.4/distribution" | |
' loads the library's bootstrap | |
!include $LIB_BASE_LOCATION/bootstrap.puml | |
' loads the package bootstrap | |
include('domainstorytelling/bootstrap') |
#!/usr/bin/env bash | |
slugSha256() { | |
slug=$(echo -n "$1" | sha256sum | cut -d' ' -f1) | |
echo -n $((16#"${slug:0:8}")) | |
} | |
functionHash() { | |
hash=$(slugSha256 "$(echo -n "$1" | sed 's/ //g')") | |
if [[ "$1" == *constructor* ]] || [[ "$1" == *cell* ]] || [[ "$1" == *bytes* ]]; then |
#!/usr/bin/env ts-node | |
import { createHash } from 'crypto' | |
function slugSha256(data: string): number { | |
return Number(`0x${createHash('sha256').update(data).digest('hex').slice(0, 8)}`) | |
} | |
function functionHash(signature: string): number { | |
let hash = slugSha256(signature.replaceAll(' ', '')) | |
// FIXME for constructor, cell, bytes see https://gist.github.com/ilyar/484360bdb5464a6f252bd8f8ec10aaff |
#!/usr/bin/env node | |
'use strict' | |
const { createHash } = require('crypto') | |
function slugSha256(data) { | |
return Number(`0x${createHash('sha256').update(data).digest('hex').slice(0, 8)}`) | |
} | |
function functionHash(signature) { |