Code Monkey home page Code Monkey logo

soldev-ui's People

Contributors

cdhiraj40 avatar darwin911 avatar domkoder avatar italoacasas avatar jamesrp13 avatar johnanthos avatar mikejhale avatar mikemaccana avatar nickfrosty avatar sunitroy2703 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

soldev-ui's Issues

Miss-information about data ordering ...

Hello, dear soldev team. i think there is a mistake in section "Data Order" FROM "Dealing with Accounts" subject, that you say you must always place the dynamic variables like Vectors and strings in the end of the Account's data structure to be able to keep track of static variables like ids very easy BUT it really does not matter how to order them for example:

Screenshot 2023-10-03 192401

#[account]
pub struct Data {
scores: Vec,
id: u8
}

  • In the top example you must specify a static space for your vector, in the account creation time it looks like it is dynamic but in Solana under the hood it is static beacuz the blockchain's space is limited and we have exatcly specify how mush space we want to rent.

Raw data output for Data's PDA account (with considering10 elements in the vector) :

  • <Buffer ce 9c 3b bc 12 4f f0 e8 03 00 00 00 0a 05 ff 00 00 00 00 00 00 00 01>
    discriminator(8 bytes) + vector-u8(4 + (10 * 1)) + id-u8(1 byte)

  • Memcmp for tracking the "id" section:
    {
    offset: 8 + 14,
    bytes: base58.encode(id)
    }

[Bug]: Broken links README.md and website

Describe the bug:

Two links in the README.md file and two other links on the index page are broken.

Steps to reproduce the behavior:

  1. Go to 'README.md file '
  2. Click on 'the current milestone link and also the link that takes you to create and issue'
  3. Go to 'https://www.soldev.app/ '
  4. Scroll down to 'the Featured section'
  5. Click on 'Solana Bootcamp by Jarry Xiao card'
  6. Scroll down to 'the Footer section'
  7. Click on 'Solana Bootcamp in the learn category'
  8. All the links take you to a 404 page

Expected behavior:

The links are not supposed to take you to a 404 page

Screenshots:

Screenshot from 2024-02-02 01-21-40

Screenshot from 2024-02-02 01-20-58

Additional context:

I've fixed three of the bugs in this fork except for the current milestone link, I don't know what link to use there.

I will be sending PR as soon as I test and make sure my fix is not breaking anything.

@nickfrosty @mikemaccana please can I get the .env.local file so I can test

[Feature Request]: Course1: Tutorial for Importing Keypairs from Private Keys or Mnemonics

Is your feature request related to a problem? Please describe.
Yes, the current SolDev documentation lacks a clear guide on how to import a keypair from a private key or mnemonic phrase. This gap can be frustrating for developers looking to integrate existing wallets into Solana applications or for those who need to securely generate keypairs from existing credentials.

Describe the solution you'd like
I propose adding a detailed tutorial to the SolDev documentation that covers the following topics:

  1. Importing from a Private Key: Instructions on converting a Base58 encoded private key string into a Uint8Array, and then using this byte array to generate a Keypair object. This section should include examples using @solana/web3.js and emphasize security best practices to avoid exposing private keys.

  2. Importing from a Mnemonic Phrase: A guide on converting a mnemonic phrase into a keypair, highlighting the secure use of libraries like bip39 and @solana/web3.js's Keypair.fromSeed method. This should also include example code and step-by-step instructions.

Describe alternatives you've considered
An alternative could be community-generated tutorials or external documentation; however, having official documentation ensures accuracy, security, and ease of access for developers.

Additional context
Adding these tutorials will not only fill a crucial gap in the documentation but also enhance the overall developer experience within the Solana ecosystem. It will provide a one-stop guide for developers to securely integrate and manage keypairs, which is fundamental for building decentralized applications on Solana.

Mismatch of imports at Module 1 cap 4 lab

Hello there team!

Describe the bug:

Import at scaffold does not match implementation of lab. At the scaffold Keypair is imported whereas in the lab itself, the default importweb3 is used.
Also, step goes from 1 to 4, skipping 2 and 3. (see attached screenshot)

As a side note when clicking on here at README.md it looks like the link is broken as it redirects to https://github.com/https://github.com/ironforge-cloud/soldev-ui/issues/new (see also attached screenshot) .

Thanks for the great work!

Mismatch of imports Broken link
Screenshot 2023-12-08 at 13 43 52 Screenshot 2023-12-08 at 13 52 07

[Bug]: Recently added images are 404ing.

Describe the bug:
Similar to #16, recently added images are 404ing.

Old image: https://www.soldev.app/assets/movie-reviews-frontend.png works
New image: https://www.soldev.app/assets/wallet-addresses.svg 404s

Both img elements use a relative path to ../assets so I'm pretty sure both are correct/

Test URL:

Steps to reproduce the behavior:

  1. Go to https://www.soldev.app/course/intro-to-cryptography
  2. Open the JS console
  3. See error:
GET https://www.soldev.app/assets/wallet-addresses.svg 404 (Not Found)

Expected behavior:
Image shown, 200 OK

Screenshots:
Screenshot 2023-09-25 at 11 29 21

[Bug]: Course Chapter 1, Page 3 has unclear and not correct code example

Describe the bug:
I am talking about this page: https://www.soldev.app/course/intro-to-writing-data

In the Lab section, you can find the following code example which I annotated with comments where I think the block could be improved:

import * as web3 from "@solana/web3.js";
import * as dotenv from "dotenv";
import base58 from "bs58"; // not actually used here (neither in the next block), can be removed
import { getKeypairFromEnvironment } from "@solana-developers/node-helpers"
const toPubkey = new PublicKey(suppliedToPubkey); // suppliedToPubkey is nowhere defined. Maybe show an example with a generated pub key here as in the first tutorial

dotenv.config(); // with es module syntax, it's actually better to just import dotenv/config

const senderKeypair = getKeypairFromEnvironment("SECRET_KEY");

const connection = new Connection("https://api.devnet.solana.com", "confirmed");


console.log(`โœ… Loaded our own keypair, the destination public key, and connected to Solana`);

This is what I would suggest the code to update to:

import "dotenv/config"
import { Connection, clusterApiUrl, Keypair } from "@solana/web3.js"
import { getKeypairFromEnvironment } from "@solana-developers/node-helpers"

const { publicKey: toPubkey } = new Keypair()
const senderKeypair = getKeypairFromEnvironment("SECRET_KEY")

const connection = new Connection(clusterApiUrl("devnet"))

console.log(
  `โœ… Loaded our own keypair, the destination public key, and connected to Solana`,
)

[Bug]: Course 3 : Write data to the network

When the balance of the target address is 0, the tutorial's const LAMPORTS_TO_SEND = 5000; will throw an error:

SendTransactionError: failed to send transaction: Transaction simulation failed: Transaction results in an account (1) with insufficient funds for rent.

It needs to be increased, I have set it to 500000000.

UI: fix margin left

the left side margin on my laptop is messed up, especially when filtering

image

[Bug]: Code Example of Intro to Anchor development

the test case in this chapter

it("Incremented the count", async () => {
  const tx = await program.methods
    .increment()
    .accounts({ counter: counter.publicKey, user: provider.wallet.publicKey })
    .rpc()

  const account = await program.account.counter.fetch(counter.publicKey)
  expect(account.count.toNumber() === 1)
})

the way of using expect will return true all the time, no matter what number is given

considering using the following expression

expect(account.count.toNumber()).to.equal(1)

[Bug]: new content 404ing

Describe the bug:
Hi Italo I'm not 100% sure if you're the right person for this, but there's some 404s of newer content on. Soldev - in particular, the 'Getting started' and 'Cryptography fundamentals' are 404ing. Not sure if you need to re-run some kind of process on the soldev.app site when we add new content.

Steps to reproduce the behavior:

  1. Go to https://www.soldev.app/course
  2. Click on Getting started
  3. See 404

I've let @jamesrp13 know too.

[Bug]:

Describe the bug:
In https://www.soldev.app/course/interact-with-wallets 3. Wrap the app in context providers has a code snippet looks like

import { FC, ReactNode } from "react";

const WalletContextProvider: FC<{ children: ReactNode }> = ({ children }) => {
  return (

  ));
};

export default WalletContextProvider;

in the six line , there are two brackets

Steps to reproduce the behavior:

Expected behavior:
just need one bracket

Screenshots:

Additional context:

[Feature Request]: Add School of Solana to the Learn Menu dropdown

Hi, we are running the fifth season of School of Solana next month, which is backed by the Solana Foundation. We'd love to display our course on the Learn menu dropdown above the buildspace Solana course.

We have been running School of Solana since 2022 and are continuously improving it with every edition. It runs twice a year.

Title: School of Solana
Description: A 9-week course on Rust and Solana
Icon: same as buildspace is fine
Link: https://ackeeblockchain.com/school-of-solana

Please let me know if this is possible and if the information provided is sufficient or if you would like me to create a PR for review to make these changes live. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.