delete js/ts related things, cli and client both have separate repos
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
9762d88986
commit
55c788cdc2
24
cli.ts
24
cli.ts
|
@ -1,24 +0,0 @@
|
|||
import * as anchor from "@project-serum/anchor";
|
||||
|
||||
async function main() {
|
||||
const programId = new anchor.web3.PublicKey(
|
||||
"4Q6WW2ouZ6V3iaNm56MTd5n2tnTm4C5fiH8miFHnAFHo"
|
||||
);
|
||||
const clusterUrl = "https://api.devnet.solana.com";
|
||||
const throwAway = new anchor.web3.Keypair();
|
||||
|
||||
const connection = new anchor.web3.Connection(clusterUrl, "confirmed");
|
||||
|
||||
const walletWrapper = new anchor.Wallet(throwAway);
|
||||
|
||||
const provider = new anchor.Provider(connection, walletWrapper, {
|
||||
preflightCommitment: "confirmed",
|
||||
});
|
||||
|
||||
const idl = await anchor.Program.fetchIdl(programId, provider);
|
||||
|
||||
const program = new anchor.Program(idl, programId, provider);
|
||||
console.log("program id from anchor", program.programId.toBase58());
|
||||
}
|
||||
|
||||
main();
|
25
package.json
25
package.json
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"scripts": {
|
||||
"lint:fix": "prettier tests/** -w",
|
||||
"test": "anchor test",
|
||||
"cli": "ts-node cli.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@project-serum/anchor": "^0.17.1-beta.1",
|
||||
"@project-serum/common": "^0.0.1-beta.3",
|
||||
"@solana/spl-token": "^0.1.8",
|
||||
"@types/chai": "^4.3.0",
|
||||
"@types/node": "^16.11.13",
|
||||
"@types/yargs": "^17.0.7",
|
||||
"bn.js": "^5.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^9.0.0",
|
||||
"chai": "^4.3.4",
|
||||
"mocha": "^9.0.3",
|
||||
"prettier": "^2.4.1",
|
||||
"ts-mocha": "^8.0.0",
|
||||
"typescript": "^4.3.5",
|
||||
"yargs": "^17.3.0"
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
anchor build
|
||||
cp target/types/voter_stake_registry.ts .
|
||||
git add voter_stake_registry.ts
|
||||
git commit -m "update anchor types file"
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"types": ["mocha", "chai"],
|
||||
"typeRoots": ["./node_modules/@types"],
|
||||
"lib": ["es2015","dom"],
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue