diff --git a/Codigo/README.md b/Codigo/README.md
new file mode 100644
index 0000000..c12b24f
--- /dev/null
+++ b/Codigo/README.md
@@ -0,0 +1,22 @@
+# Encode-Solana-Decentralized-Twitter
+
+
+
+ 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.
diff --git a/program/Cargo.lock b/Codigo/program/Cargo.lock
similarity index 100%
rename from program/Cargo.lock
rename to Codigo/program/Cargo.lock
diff --git a/program/Cargo.toml b/Codigo/program/Cargo.toml
similarity index 94%
rename from program/Cargo.toml
rename to Codigo/program/Cargo.toml
index 235f514..d308bd9 100644
--- a/program/Cargo.toml
+++ b/Codigo/program/Cargo.toml
@@ -25,4 +25,4 @@ toml_edit = "=0.21.0"
[lib]
crate-type = ["cdylib", "lib"]
-path = "./lib.rs"
\ No newline at end of file
+path = "lib.rs"
\ No newline at end of file
diff --git a/program/generated/entrypoint.rs b/Codigo/program/generated/entrypoint.rs
similarity index 100%
rename from program/generated/entrypoint.rs
rename to Codigo/program/generated/entrypoint.rs
diff --git a/program/generated/errors.rs b/Codigo/program/generated/errors.rs
similarity index 100%
rename from program/generated/errors.rs
rename to Codigo/program/generated/errors.rs
diff --git a/program/generated/instructions.rs b/Codigo/program/generated/instructions.rs
similarity index 100%
rename from program/generated/instructions.rs
rename to Codigo/program/generated/instructions.rs
diff --git a/program/generated/mod.rs b/Codigo/program/generated/mod.rs
similarity index 100%
rename from program/generated/mod.rs
rename to Codigo/program/generated/mod.rs
diff --git a/program/generated/processor.rs b/Codigo/program/generated/processor.rs
similarity index 100%
rename from program/generated/processor.rs
rename to Codigo/program/generated/processor.rs
diff --git a/program/generated/state.rs b/Codigo/program/generated/state.rs
similarity index 100%
rename from program/generated/state.rs
rename to Codigo/program/generated/state.rs
diff --git a/program/lib.rs b/Codigo/program/lib.rs
similarity index 100%
rename from program/lib.rs
rename to Codigo/program/lib.rs
diff --git a/program/src/add_tweet.rs b/Codigo/program/src/add_tweet.rs
similarity index 99%
rename from program/src/add_tweet.rs
rename to Codigo/program/src/add_tweet.rs
index a3ba535..6e81002 100644
--- a/program/src/add_tweet.rs
+++ b/Codigo/program/src/add_tweet.rs
@@ -18,10 +18,5 @@ pub fn add_tweet(
) -> ProgramResult {
// Implement your business logic here...
tweet_account.data.text = "test txt".to_string();
-
-
-
-
-
Ok(())
}
\ No newline at end of file
diff --git a/program/src/mod.rs b/Codigo/program/src/mod.rs
similarity index 100%
rename from program/src/mod.rs
rename to Codigo/program/src/mod.rs
diff --git a/program_client/app.ts b/Codigo/program_client/app.ts
similarity index 82%
rename from program_client/app.ts
rename to Codigo/program_client/app.ts
index c1e217d..3ca5e74 100644
--- a/program_client/app.ts
+++ b/Codigo/program_client/app.ts
@@ -6,10 +6,10 @@ import * as os from "os";
async function main(feePayer: Keypair) {
// TODO: Specify the program Id we saved from when we deploy it
- const progId = new PublicKey("DeAgefytsTT6cucaWBAgah3LkYpN7gngWfxk5JHddWEL");
+ const progId = new PublicKey("9U8FpTpoP6j5uqBURoRUkGY7JLpUmAmALd6KWhMSKaXh");
// Create a new Solana connection
- const connection = new Connection("http://127.0.0.1:8899", {
+ const connection = new Connection("https://api.devnet.solana.com ", {
commitment: "confirmed"
});
@@ -29,6 +29,7 @@ async function main(feePayer: Keypair) {
console.info(account);
console.log(await connection.getAccountInfo(tweetAccount.publicKey));
console.log(await connection.getAccountInfo(feePayer.publicKey));
+ console.log(await connection.getAccountInfo(feePayer.publicKey));
}
diff --git a/Codigo/program_client/greeter.html b/Codigo/program_client/greeter.html
new file mode 100644
index 0000000..6458ebb
--- /dev/null
+++ b/Codigo/program_client/greeter.html
@@ -0,0 +1,9 @@
+
+
+