Bladeren bron

build bpf -> build sbf (#101)

Ayush 1 jaar geleden
bovenliggende
commit
21a52cb1eb

+ 2 - 2
basics/account-data/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/checking-accounts/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/close-account/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/counter/mpl-stack/README.md

@@ -5,9 +5,9 @@ This example program is written using Solana native using MPL stack.
 
 ## Setup
 
-1. Build the program with `cargo build-bpf`
+1. Build the program with `cargo build-sbf`
 2. Compile the idl with `shank build`
 3. Build the typescript SDK with `yarn solita`
- - Temporarily, we have to modify line 58 in ts/generated/accounts/Counter.ts 
+ - Temporarily, we have to modify line 58 in ts/generated/accounts/Counter.ts
  to `const accountInfo = await connection.getAccountInfo(address, { commitment: "confirmed" });` in order to allow the tests to pass. In the future versions of Solita, this will be fixed.
 4. Run tests with `yarn test`

+ 1 - 1
basics/counter/native/README.md

@@ -4,7 +4,7 @@ This example program is written in Solana using only the Solana toolsuite.
 
 ## Setup
 
-1. Build the program with `cargo build-bpf`
+1. Build the program with `cargo build-sbf`
 2. Run tests + local validator with `yarn test`
 
 ## Debugging

+ 2 - 2
basics/create-account/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 1 - 1
basics/cross-program-invocation/native/cicd.sh

@@ -4,7 +4,7 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --bpf-out-dir=./target/so
+cargo build-sbf --bpf-out-dir=./target/so
 echo "Hand:"
 solana program deploy ./target/so/hand.so | grep "Program Id:"
 echo "Lever:"

+ 2 - 2
basics/hello-solana/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/pda-rent-payer/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 4 - 4
basics/processing-instructions/README.md

@@ -1,11 +1,11 @@
 # Custom Instruction Data
 
-Let's take a look at how to pass our own custom instruction data to a program. This data must be *serialized* to *Berkeley Packet Filter (BPF)* format - which is what the Solana runtime supports for serialized data.   
+Let's take a look at how to pass our own custom instruction data to a program. This data must be *serialized* to *Berkeley Packet Filter (BPF)* format - which is what the Solana runtime supports for serialized data.
 
-BPF is exactly why we use `cargo build-bpf` to build Solana programs in Rust. For instructions sent over RPC it's no different. We'll use a library called `borsh` on both client and program side.   
+BPF is exactly why we use `cargo build-sbf` to build Solana programs in Rust. For instructions sent over RPC it's no different. We'll use a library called `borsh` on both client and program side.
 
 _____
 
-**For native**, we need to add `borsh` and `borsh-derive` to `Cargo.toml` so we can mark a struct as serializable to/from **BPF format**.   
+**For native**, we need to add `borsh` and `borsh-derive` to `Cargo.toml` so we can mark a struct as serializable to/from **BPF format**.
 
-**For Anchor**, you'll see that they've made it quite easy (as in, they do all of the serializing for you).
+**For Anchor**, you'll see that they've made it quite easy (as in, they do all of the serializing for you).

+ 2 - 2
basics/processing-instructions/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/program-derived-addresses/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/realloc/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/rent/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/repository-layout/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
basics/transfer-sol/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
-solana program deploy ./program/target/so/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml --bpf-out-dir=./program/target/so
+solana program deploy ./program/target/so/program.so

+ 2 - 2
tokens/create-token/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/nft-minter/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/pda-mint-authority/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/spl-token-minter/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/token-2022/default-account-state/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/token-2022/mint-close-authority/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/token-2022/multiple-extensions/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/token-2022/non-transferable/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/token-2022/transfer-fee/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so

+ 2 - 2
tokens/transfer-tokens/native/cicd.sh

@@ -4,5 +4,5 @@
 # It also serves as a reference for the commands used for building & deploying Solana programs.
 # Run this bad boy with "bash cicd.sh" or "./cicd.sh"
 
-cargo build-bpf --manifest-path=./program/Cargo.toml
-solana program deploy ./program/target/deploy/program.so
+cargo build-sbf --manifest-path=./program/Cargo.toml
+solana program deploy ./program/target/deploy/program.so