-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Moved Codigo project into a new folder
- Reverted Readme in root folder.
- Loading branch information
1 parent
087a71a
commit 2f1d450
Showing
25 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Encode-Solana-Decentralized-Twitter | ||
|
||
<img src="https://i.ibb.co/0tfV7NF/image.png"> | ||
|
||
Encode Main Repo for Solana-Decentralized-Twitter | ||
|
||
## Local Deployment | ||
|
||
1. Start a local validator by running `solana-test-validator`. | ||
2. Go to the `program` folder and run `cargo build-sbf` | ||
2. Run `solana program deploy target/deploy/x_sol.so`. This will deploy the program on-chain. | ||
3. Save the program Id returned by the deploy command. | ||
|
||
## Testing Locally | ||
|
||
1. Start a local validator by running `solana-test-validator`. | ||
2. Run `solana logs` on a separate terminal to keep track of interactions with the local validator. | ||
2. Go to the `program_client` folder and run `npm install` | ||
2. Now run `npm install --save-dev ts-node`. This will install the TypeScript execution engine. | ||
3. Use the program Id returned by the `deploy` command to set the `progId` constant in the `app.ts` file. | ||
4. Run `npx ts-node app.ts`. This will trigger the transaction that creates a new tweet. | ||
5. Check the logs terminal to see all interactions with the validator. |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ toml_edit = "=0.21.0" | |
|
||
[lib] | ||
crate-type = ["cdylib", "lib"] | ||
path = "./lib.rs" | ||
path = "lib.rs" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>TypeScript Greeter</title> | ||
</head> | ||
<body> | ||
<script src="greeter.js"></script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function greeter(person: string) { | ||
return "Hello, " + person; | ||
} | ||
|
||
let user = "Jane User"; | ||
|
||
document.body.textContent = greeter(user); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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