This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Move Datatypes shell for BCS generation, DO NOT MODIFY.""" | |
from typing import Any | |
import json | |
import canoser | |
import pysui.sui.sui_types.bcs_stnd as bcse | |
class EventBlob(canoser.Struct): | |
"""Generated from 0xfdc88f7d7cf30afab2f82e8380d11ee8f70efb90e863d1de8616fae1bb09ea77::event_blob::EventBlob""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# -*- coding: utf-8 -*- | |
"""Script to generate missing aliases in Sui Config.""" | |
import os | |
import base64 | |
import json | |
from pathlib import Path | |
import yaml | |
from pysui import SuiConfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2022 Frank V. Castellucci | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Used to map pointers into data array | |
use arrayref::{array_mut_ref, array_ref, array_refs, mut_array_refs}; | |
use borsh::{BorshDeserialize, BorshSerialize}; | |
use std::iter::repeat; | |
const INITIALIZED_BYTES: usize = 1; | |
const VECTOR_CHUNK_LENGTH: usize = 4; | |
const VECTOR_CHUNK_BYTES: usize = 5116; | |
const DATA_ACCOUNT_STATE_SPACE: usize = | |
INITIALIZED_BYTES + VECTOR_CHUNK_LENGTH + VECTOR_CHUNK_BYTES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{collections::BTreeMap, iter::repeat}; | |
use arrayref::{array_mut_ref, array_ref, array_refs, mut_array_refs}; | |
use borsh::{BorshDeserialize, BorshSerialize}; | |
const INITIALIZED_BYTES: usize = 1; | |
const TRACKING_CHUNK_LENGTH: usize = 4; | |
const TRACKING_CHUNK_BYTES: usize = 5116; | |
const TRACKING_ACCOUNT_STATE_SPACE: usize = | |
INITIALIZED_BYTES + TRACKING_CHUNK_LENGTH + TRACKING_CHUNK_BYTES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; argparse - ChrysaLisp Argument Processor | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(defq +nl+ (ascii-char 10)) | |
(defq +indent2+ 2) | |
(defq +indent4+ 4) | |
; Potential utility macros to embed in ChrysaLisp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import logging | |
import errors | |
from zmq.asyncio import ZMQEventLoop | |
from messaging import ( | |
Connection, DisconnectError, SendBackoffTimeoutError) | |
from sawtooth_sdk.protobuf import client_state_pb2 | |
from sawtooth_sdk.protobuf.validator_pb2 import Message | |
from google.protobuf.json_format import MessageToDict | |
from google.protobuf.message import DecodeError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//partial.c | |
/* | |
Author: Frank V. Castellucci | |
Simple example to demonstrate 'partial' application (lambda calculus) | |
of function. | |
Brief Intro: | |
I've created a compiled function language 'CFL' which supports curry/partial | |
application of functions, lambdas and closures. CFL: | |
Is typeless, everything is an OBJ* (see below for simplified) |