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 { sendAcceptOffer } from "proton-tsc/atomicassets/atomicassets.inline"; | |
import { sendCreateAccount } from "./inlines/create-account.inline"; | |
import { Contract, Name, PublicKey } from "proton-tsc"; | |
@contract | |
export class FactoryContract extends Contract { | |
/**---------------------------------------------- | |
* * INFO |
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
<template> | |
<div class="scene-container" ref="container"></div> | |
</template> | |
<script> | |
import { ref, onMounted, onBeforeUnmount, watch } from 'vue' | |
import * as THREE from 'three' | |
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls' | |
const vertexShader = ` |
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
!/bin/bash | |
./stop.sh | |
cd ./snapshots && rm -rf ./* && wget https://snapshots.eosusa.io/snapshots/proton/latest.zst && unzstd latest.zst | |
cd ../ && rm -rf state blocks | |
./start.sh --snapshot ./snapshots/latest |
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
html[data-theme="twelvedays"] .proton-link-inner, | |
html[data-theme="twelvedays"] .wallet-selector-inner, | |
html[data-theme="twelvedays"] .wallet-selector-connect | |
{ | |
background-color: #0b211c; | |
} | |
html[data-theme="twelvedays"] .proton-link-header, | |
html[data-theme="twelvedays"] .wallet-selector-title { |
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
// Generating smart contract TS types definition from local abi file with abi2ts | |
// npx abi2ts betsxpr -f ./target/betxpr.contract.abi > ./tests/interfaces/betxpr.ts | |
describe("End prediction", () => { | |
it("Should pick resolvers 4 resolvers (resolverSeeds length + 1) ", async () => { | |
// {contractName}_actionParams<'{action_name}'> turn a typed action parameters object to an array | |
const predictionEndParams = betsxpr_actionParams<'gov.endpoll'>({ | |
predictionKey: 0, | |
resolverSeeds:[0,1,2] | |
}) |
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 { NextResponse } from "next/server"; | |
import { PostMethodSymbol } from "./http-methods/post"; | |
import { GetMethodSymbol } from "./http-methods/get"; | |
export interface APIService { | |
GET:()=>void, | |
POST:()=>void, | |
} | |
// How can i fix the return type to avoid type check issue ? |
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
{ | |
"[typescriptreact]": { | |
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | |
}, | |
"[typescript]": { | |
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | |
}, | |
"[scss]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
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 React, {useState, useEffect} from "react"; | |
import {Api, JsonRpc, JsSignatureProvider} from "@proton/js"; | |
import {SigningRequest} from "@proton/signing-request"; | |
import pako from "pako"; | |
import {Text, View, StyleSheet, Button} from "react-native"; | |
import {BarCodeScanner} from "expo-barcode-scanner"; | |
import * as encodeAndDecodeModule from "fastestsmallesttextencoderdecoder"; | |
const fetch = require("node-fetch"); // ou d'autres alternatives selon l'environnement | |
const endpoints = ["https://api.protonnz.com"]; // Remplacez par l'URL de votre nœud EOSIO |
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 { Checksum256,U256,sha256 } from "proton-tsc"; | |
export function u64ArrayToU256(assetIds:u64[]): U256 { | |
const hash: U256 = new U256() | |
const sortedAsset: u64[] = (assetIds).sort((a: u64, b: u64) => u32(a - b)); | |
return sortedAsset.reduce((prev: U256, current: u64): U256 => { | |
return U256.add(prev, U256.fromU64(current)); | |
},new U256()) | |
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 client" | |
import React, { | |
createContext, | |
useState, | |
useCallback, | |
useContext | |
} from 'react'; | |
import ProtonWebSDK,{ ProtonWebLink, Link,LinkSession } from '@proton/web-sdk'; | |
export interface AuthState { |
NewerOlder