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 num::BigUint; | |
| use plonky2::{ | |
| hash::{ | |
| hash_types::{HashOut, RichField}, | |
| merkle_proofs::MerkleProof, | |
| }, | |
| plonk::config::Hasher, | |
| }; | |
| use super::{hash::Leafable, merkle_tree::MerkleTree}; | 
  
    
      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::time::Instant; | |
| // plonky2 = "0.1.3" | |
| use plonky2::{ | |
| field::{extension::Extendable, types::Field}, | |
| gates::noop::NoopGate, | |
| hash::hash_types::{HashOutTarget, MerkleCapTarget, RichField}, | |
| iop::{ | |
| target::BoolTarget, | |
| witness::{PartialWitness, WitnessWrite}, | 
  
    
      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
    
  
  
    
  | //! https://github.com/mir-protocol/plonky2 | |
| //! The following code can be used to display the witness of `x`. | |
| //! `builder.add_simple_generator(DisplayGenerator { target: x });` | |
| #[derive(Clone, Debug)] | |
| struct DisplayGenerator { | |
| target: Target, | |
| } | |
| impl<F: Field> SimpleGenerator<F> for DisplayGenerator { | 
  
    
      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::time::Instant; | |
| use plonky2::{ | |
| field::types::Field, | |
| hash::{hash_types::HashOut, poseidon::PoseidonHash}, | |
| iop::witness::{PartialWitness, Witness}, | |
| plonk::{ | |
| circuit_builder::CircuitBuilder, | |
| circuit_data::CircuitConfig, | |
| config::{GenericConfig, PoseidonGoldilocksConfig}, | 
  
    
      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::time::Instant; | |
| use plonky2::{ | |
| field::goldilocks_field::GoldilocksField, | |
| iop::{ | |
| target::Target, | |
| witness::{PartialWitness, Witness}, | |
| }, | |
| plonk::{ | |
| circuit_builder::CircuitBuilder, | 
  
    
      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::fs::File; | |
| use anyhow::Context; | |
| use thiserror::Error; | |
| #[derive(Debug, Error)] | |
| pub enum MyError { | |
| #[error("HogeError: {0}")] | |
| HogeError(u8), | |
| #[error("FooError: {0}")] | 
  
    
      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
    
  
  
    
  | const Eos = require("eosjs"); | |
| const eos = Eos({ | |
| keyProvider: [], // append private key | |
| httpEndpoint: "https://api-kylin.eosasia.one:443", | |
| chainId: "5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191", | |
| }); | |
| const myContractName = "mokemokecore"; | 
  
    
      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.4.21; | |
| contract SpecialVariables { | |
| function exec() public payable returns ( | |
| address block_coinbase, | |
| uint256 block_difficulty, | |
| uint256 block_gaslimit, | |
| uint256 block_number, | |
| uint256 block_timestamp, | |
| uint256 gas_left, | 
  
    
      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.4.21; | |
| import "./PCS.sol"; | |
| import "./SafeMath.sol"; | |
| contract CommunityToken is PCS { | |
| using SafeMath for uint256; | |
| uint256 internal tokenPrice; | |
| address[] internal serviceProviderList; | 
  
    
      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.4.0; | |
| library GetCode { | |
| function at(address _addr) public view returns (bytes o_code) { | |
| assembly { | |
| // retrieve the size of the code, this needs assembly | |
| let size := extcodesize(_addr) | |
| // allocate output byte array - this could also be done without assembly | |
| // by using o_code = new bytes(size) | |
| o_code := mload(0x40) | 
NewerOlder