1639617889
This is Video I in a Series on Solana. This video will demonstrate how Smart Contracts in Solana work and the rules around programming them. We will also take a look at a sample project explaining each line of code, and finally refactoring the code to send data to the smart contract and retrieving it.
Here's the source code on github https://github.com/jsoneaday/solana-example-helloworld
1648532804
#Solana price moons past $100 as #SOL bulls set their eyes on $150
#Solana price is looking promising
#Solana price has ascended into the mid $110 zone to start this week's trading session. It was mentioned in last week's neutral thesis that a breach above the triangle's C wave at $106 could be the ultimate catalyst to a 40% rally. This weekend, The bulls pushed Solana price through the trigger level, printing two bullish engulfing candles on the 9-hour chart.
#Solana price will likely continue rising as five wave impulses typically follow triangle breakouts. #Solana price has completed the first impulse into the trigger level at $106 and will need two more impulsive waves to justify the validity of the triangle consolidation.
It's also worth noting that the volume profile is increasing with large buy orders from investors, indicating strength and confidence in the current trend. Traders should consider looking for entries on smaller time frames as the price is likely to chop around the trigger zone.
1639617889
This is Video I in a Series on Solana. This video will demonstrate how Smart Contracts in Solana work and the rules around programming them. We will also take a look at a sample project explaining each line of code, and finally refactoring the code to send data to the smart contract and retrieving it.
Here's the source code on github https://github.com/jsoneaday/solana-example-helloworld
1650814320
Rust (user-space) virtual machine for eBPF
This is a fork of RBPF by Quentin Monnet.
This crate contains a virtual machine for eBPF program execution. BPF, as in Berkeley Packet Filter, is an assembly-like language initially developed for BSD systems, in order to filter packets in the kernel with tools such as tcpdump so as to avoid useless copies to user-space. It was ported to Linux, where it evolved into eBPF (extended BPF), a faster version with more features. While BPF programs are originally intended to run in the kernel, the virtual machine of this crate enables running it in user-space applications; it contains an interpreter, an x86_64 JIT-compiler for eBPF programs, as well as an assembler, disassembler and verifier.
The crate is supposed to compile and run on Linux, MacOS X, and Windows, although the JIT-compiler does not work with Windows at this time.
This crate is available from crates.io, so it should work out of the box by adding it as a dependency in your Cargo.toml
file:
[dependencies]
solana_rbpf = "0.2.26"
You can also use the development version from this GitHub repository. This should be as simple as putting this inside your Cargo.toml
:
[dependencies]
solana_rbpf = { git = "https://github.com/solana-labs/rbpf", branch = "main" }
Of course, if you prefer, you can clone it locally, possibly hack the crate, and then indicate the path of your local version in Cargo.toml
:
[dependencies]
solana_rbpf = { path = "path/to/solana_rbpf" }
Then indicate in your source code that you want to use the crate:
extern crate solana_rbpf;
The API is pretty well documented inside the source code. You should also be able to access an online version of the documentation from here, automatically generated from the crates.io version (may not be up-to-date with master branch). Examples, unit tests and performance benchmarks should also prove helpful.
Here are the steps to follow to run an eBPF program with rbpf:
Download Details:
Author: solana-labs
Source Code: https://github.com/solana-labs/rbpf
License: View license
1643176207
Serde
*Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.*
You may be looking for:
#[derive(Serialize, Deserialize)]
Click to show Cargo.toml. Run this code in the playground.
[dependencies]
# The core APIs, including the Serialize and Deserialize traits. Always
# required when using Serde. The "derive" feature is only required when
# using #[derive(Serialize, Deserialize)] to make Serde work with structs
# and enums defined in your crate.
serde = { version = "1.0", features = ["derive"] }
# Each data format lives in its own crate; the sample code below uses JSON
# but you may be using a different one.
serde_json = "1.0"
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize, Debug)]
struct Point {
x: i32,
y: i32,
}
fn main() {
let point = Point { x: 1, y: 2 };
// Convert the Point to a JSON string.
let serialized = serde_json::to_string(&point).unwrap();
// Prints serialized = {"x":1,"y":2}
println!("serialized = {}", serialized);
// Convert the JSON string back to a Point.
let deserialized: Point = serde_json::from_str(&serialized).unwrap();
// Prints deserialized = Point { x: 1, y: 2 }
println!("deserialized = {:?}", deserialized);
}
Serde is one of the most widely used Rust libraries so any place that Rustaceans congregate will be able to help you out. For chat, consider trying the #rust-questions or #rust-beginners channels of the unofficial community Discord (invite: https://discord.gg/rust-lang-community), the #rust-usage or #beginners channels of the official Rust Project Discord (invite: https://discord.gg/rust-lang), or the #general stream in Zulip. For asynchronous, consider the [rust] tag on StackOverflow, the /r/rust subreddit which has a pinned weekly easy questions post, or the Rust Discourse forum. It's acceptable to file a support issue in this repo but they tend not to get as many eyes as any of the above and may get closed without a response after some time.
Download Details:
Author: serde-rs
Source Code: https://github.com/serde-rs/serde
License: View license
1652409401
Do you want to develop dApps on Solana, but you don't have any Rust knowledge? Don't worry. In this course, you will learn how to build smart contracts on Solana from complete basics. No prior Rust knowledge is required.
The goal of this course is to introduce you to the basics of Rust and allow you to build smart contracts on Solana even if you didn't have any prior Rust knowledge. This is the perfect course for anyone that wants to get into Solana development.
Zsolt Nagy started as a Backend Web Developer in 2006, but turned to Frontend development some years later. Zsolt has spent the last ten years working with JavaScript. As a team lead, tech lead, and engineering manager, he has conducted hundreds of tech interviews and has hired multiple world class engineers. Besides coding in JavaScript, Zsolt is also a mentor and bootcamp instructor at various coding schools. His tech blog on zsoltnagy.eu focuses on developing maintainable web applications.
#rust #solana #programming #blockchain #web3 #moralis #dapp #smartcontracts