This file contains 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Owner | |
* @dev Set & change owner | |
*/ | |
struct LearningPoint { |
This file contains 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
struct User { | |
address server; | |
string encryptedPushToken; | |
} |
This file contains 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.7.0 <0.9.0; | |
contract MyErc20 { | |
string NAME = "MyErc20TokensReallyLongName"; | |
string SYMBOL = "M20"; | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
This file contains 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 { | |
Connection, | |
TransactionInstruction, | |
Transaction, | |
sendAndConfirmTransaction, | |
PublicKey, | |
SystemProgram, | |
Keypair, | |
} = require('@solana/web3.js'); | |
const fs = require('mz/fs'); |
This file contains 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 { | |
Connection, | |
Keypair, | |
} = require('@solana/web3.js'); | |
const fs = require('mz/fs'); | |
async function establishConnection() { | |
const rpcUrl = 'http://localhost:8899'; | |
connection = new Connection(rpcUrl, 'confirmed'); | |
const version = await connection.getVersion(); |
This file contains 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 { | |
Connection, | |
} = require('@solana/web3.js'); | |
async function establishConnection() { | |
const rpcUrl = 'http://localhost:8899'; | |
connection = new Connection(rpcUrl, 'confirmed'); | |
const version = await connection.getVersion(); | |
console.log('Connection to cluster established:', rpcUrl, version); | |
} |
This file contains 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 { | |
Connection, | |
TransactionInstruction, | |
Transaction, | |
sendAndConfirmTransaction, | |
PublicKey, | |
SystemProgram, | |
} = require('@solana/web3.js'); | |
const fs = require('mz/fs'); |
This file contains 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 borsh::{BorshDeserialize, BorshSerialize}; | |
use std::collections::HashMap; | |
use std::convert::TryInto; | |
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
entrypoint::ProgramResult, | |
msg, | |
program_error::ProgramError, |
This file contains 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
[package] | |
name = "solana-bpf-crowdsource" | |
version = "0.0.1" | |
description = "Example template program written in Rust" | |
authors = ["Solana Maintainers <maintainers@solana.com>"] | |
repository = "https://github.com/solana-labs/solana" | |
license = "Apache-2.0" | |
homepage = "https://solana.com/" | |
edition = "2018" |
This file contains 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 borsh::{BorshDeserialize, BorshSerialize}; | |
use std::collections::HashMap; | |
use std::convert::TryInto; | |
use solana_program::{ | |
account_info::{next_account_info, AccountInfo}, | |
entrypoint, | |
entrypoint::ProgramResult, | |
msg, | |
program_error::ProgramError, |