const { connect, keyStores } = require("near-api-js");
const path = require("path");
const homedir = require("os").homedir();
const nacl = require("tweetnacl");
const sha256 = require("js-sha256");
const ACCOUNT_ID = "near-example.testnet";
const CREDENTIALS_DIR = ".near-credentials";| const web3 = require('@solana/web3.js'); | |
| const splToken = require('@solana/spl-token'); | |
| (async () => { | |
| //create connection to devnet | |
| const connection = new web3.Connection(web3.clusterApiUrl("devnet")); | |
| //generate keypair and airdrop 1000000000 Lamports (1 SOL) | |
| const myKeypair = web3.Keypair.generate(); |
| // first install @solana "@solana/web3.js" | |
| // yarn add @solana/web3.js | |
| import { | |
| Connection, | |
| clusterApiUrl, | |
| Keypair, | |
| LAMPORTS_PER_SOL, | |
| PublicKey, | |
| } from '@solana/web3.js'; |
The state of the application is managed by plain Javascript Object: we refer to it as the global state. It’s dedicated to:
- Keep track of the completion of the pathways by the user.
- Keep track of the state variable defined at the protocol level.
- Store the defined metadata required by each protocol
- Allow the UI to trigger the right event when needed.
foreword: A unique chapter on Arweave should be enough for a first draft
- Is there aspecific tech for data? BlockWeave Primer
- How to defend against censorship? Make data immutable
- Hello World of Blockchain: Connect to the Block
| import styled from "styled-components" | |
| const primaryColor = "#966ae0" | |
| const secondaryColor = "#F6F6F6" | |
| const PolygonLogo = () => | |
| <PolygonSVG x="0px" y="0px" viewBox="0 0 38.4 33.5" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <path d="M29,10.2c-0.7-0.4-1.6-0.4-2.4,0L21,13.5l-3.8,2.1l-5.5,3.3c-0.7,0.4-1.6,0.4-2.4,0L5,16.3 | |
| c-0.7-0.4-1.2-1.2-1.2-2.1v-5c0-0.8,0.4-1.6,1.2-2.1l4.3-2.5c0.7-0.4,1.6-0.4,2.4,0L16,7.2c0.7,0.4,1.2,1.2,1.2,2.1v3.3l3.8-2.2V7 | |
| c0-0.8-0.4-1.6-1.2-2.1l-8-4.7c-0.7-0.4-1.6-0.4-2.4,0L1.2,5C0.4,5.4,0,6.2,0,7v9.4c0,0.8,0.4,1.6,1.2,2.1l8.1,4.7 |
How would a DAO administrating the bridge work? I have to be honest, I'm a bit lost on this - as most web2 devs are, how would you explain in the simplest terms? as if i was the typical learner going through this curriculum
Younger, I remember my first solo road trip. When I've bought my first car, I thought I was definitly a freeman. Just put some gas in the tank, and any land trip was possible.
Once, far away I saw an amazing stuff: Normandy Bridge. "The perfect spot to take some selfies and boild up my socials networks" I thought. Unfortunatly at the entry, I've realized: this bridge is a tolled road for car, and I let my credit card at home.
To push a cloned repo when two factor is enable
git remote -v
git remote remove origin
git remote add origin git@github.com:zurgl/example-helloworld.git
git push --set-upstraem origin Update-to-keypairto restore a file
Standardize error handling
async function awesome() {
try {
const data = await promise;
return [data, null]
} catch(error) {
console.error(error)useEffect( () => console.log("mount"), [] );
useEffect( () => console.log("will update data1"), [ data1 ] );
useEffect( () => console.log("will update any") );
useEffect( () => () => console.log("will update data1 or unmount"), [ data1 ] );
useEffect( () => () => console.log("unmount"), [] );