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
#0 0x000070c84babb35a in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 | |
#1 0x000070c84baa90db in std::__throw_bad_alloc() () from /lib/x86_64-linux-gnu/libstdc++.so.6 | |
#2 0x00000000014634a1 in std::_Hashtable<v8::internal::Tagged<v8::internal::AllocationSite>, std::pair<v8::internal::Tagged<v8::internal::AllocationSite> const, unsigned long>, std::allocator<std::pair<v8::internal::Tagged<v8::internal::AllocationSite> const, unsigned long> >, std::__detail::_Select1st, std::equal_to<v8::internal::Tagged<v8::internal::AllocationSite> >, v8::internal::Object::Hasher, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) [clone .isra.0] () | |
#3 0x0000000001463e33 in v8::internal::PretenuringHandler::ProcessPretenuringFeedback(unsigned long) () | |
#4 0x00000000013ffa07 in v8::internal::Heap::PerformGarbageCollection(v8::internal::Gar |
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
// In this example, there are multiple "entites" made from multiple sets of accounts in the context. | |
// Would like to be able to pass around (partially) mutable entities, is use case for RefCell. | |
struct MyEntity<'a, 'b> { | |
pub &'a mut entity, | |
pub &'b ata | |
} | |
#[derive(Accounts)] |
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
// FRAGMENT | |
#include <get_from_texture> | |
precision highp float; | |
//uniform float radius; | |
uniform vec3 color; | |
uniform float thickness; | |
uniform vec2 screenSize; | |
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
// Works | |
// | |
function simpleMesh() { | |
const mesh = new THREE.Mesh(geometry, material) | |
let b = beasties[1] | |
let c = b.getCell() | |
mesh.position.set(c.x, c.y, 0) | |
material.uniforms['radius'] = { value: c.r } | |
material.uniforms['screenSize'] = { value: screenSize } | |
material.uniforms['thickness'] = { value: 10 } |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.16; | |
library Balance { | |
uint constant internal BALBITS = 35; | |
uint constant internal EXPBITS = 5; | |
uint constant internal BALMAX = 2**35-1; | |
uint constant internal BALMAXS = 2**34-1; | |
uint constant internal SIGNED = 2**39; |
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
// See blog post: https://ssadler.substack.com/p/contract-provenance-verification-175 | |
interface IProvenance { | |
function getProvenanceData() external returns (uint salt, bytes32 codeHash); | |
} | |
contract Provenance is IProvenance { | |
bytes32 immutable _salt; | |
bytes32 immutable _codeHash; |
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
pragma solidity ^0.8.16; | |
import '../lib/diamond-3-hardhat/contracts/facets/DiamondCutFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/facets/OwnershipFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/facets/DiamondLoupeFacet.sol'; | |
import '../lib/diamond-3-hardhat/contracts/libraries/LibDiamond.sol'; | |
import '../lib/diamond-3-hardhat/contracts/interfaces/IERC165.sol'; | |
import '../lib/diamond-3-hardhat/contracts/interfaces/IERC173.sol'; | |
contract QueryDiamond is OwnershipFacet, DiamondCutFacet, DiamondLoupeFacet { |
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
-- Maple data structure concept | |
-- Scott Sadler, 18/01/21 | |
-- Int is an Ethereum 32 bit word | |
-- Sometimes entities appear denormalized but should all be referenced by ID, either numeric or hash, depending on context | |
-- Fields like created, modified date not present | |
-- Nearly all of this was garnered from the "how-can-i-borrow-on-maple" page | |
-- |
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
#!/usr/bin/env python3 | |
import binascii | |
import gevent | |
import struct | |
from gevent import socket | |
def init_peer(peer, port): | |
sends = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sends.connect(peer) |
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
module SaplingSigHash where | |
import Data.Serialize | |
import Zeno.Prelude | |
import Zeno.Data.Hex | |
import qualified Haskoin as H | |
import Network.Komodo | |
import Network.ZCash.Sapling |
NewerOlder