From 95df39ae1cd7c81a08baf3bb615de6e1b6a31b33 Mon Sep 17 00:00:00 2001 From: MSghais Date: Mon, 17 Jun 2024 14:41:44 +0200 Subject: [PATCH] fix typo --- prototype/README.md | 4 ++-- prototype/escrow.md | 10 +++++----- prototype/src/index.ts | 2 +- prototype/test/tip_end_to_end.test.ts | 4 ++-- prototype/utils/escrow.ts | 4 ++-- prototype/utils/social_account.ts | 8 ++++---- prototype/utils/token.ts | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/prototype/README.md b/prototype/README.md index fd042b7d..e82585a2 100644 --- a/prototype/README.md +++ b/prototype/README.md @@ -55,14 +55,14 @@ TODO: ## How install and use it: The script is working only on Sepolia. -Please setup your .env correctly as the exemple. +Please setup your .env correctly as the example. If you want to do it on Localnet, change the Provider in this file to use your RPC_ENDPOINT: [Starknet utils](./utils//starknet.ts) ### Locally -Create and Setup your .env file, use .env.exemple as exemple +Create and Setup your .env file, use .env.example as example Install the packages ```bash diff --git a/prototype/escrow.md b/prototype/escrow.md index 9220c271..9d851d66 100644 --- a/prototype/escrow.md +++ b/prototype/escrow.md @@ -71,7 +71,7 @@ It can just be verify and not send on the Nostr relayer for "privacy" issue if n } ``` -Above exemple with a content request is the easy way to do it. +Above example with a content request is the easy way to do it. We can think about a NIP after and use existing one, but more complicated. ## Escrow: @@ -89,7 +89,7 @@ Write state for Deposit by Starknet user linked by a Nostr pk. Let's start with a very simple draft (without all details, security concerns etc) -Can be used as an exemple: +Can be used as an example: [Tokei contract like Sablier](https://github.com/starknet-io/tokei/blob/main/src/core/lockup_linear.cairo) ```ts @@ -120,10 +120,10 @@ interface UserFund { */ interface TokenEscrow { deposited: uint256; - transfered: uint256; + transferred: uint256; withdrawn: uint256; // Not a direct transfer or just you are not linked before as needed, - // but payment request claimable with date or not. Like Sablier and Tokei for exemple, or a Gift to onboard user to Starknet by Nostr user or inversely. + // but payment request claimable with date or not. Like Sablier and Tokei for example, or a Gift to onboard user to Starknet by Nostr user or inversely. to_claimed: uint256; // If we accept users can use different Starknet address with one Nostr pubkey. Need to be linked one by one to verify contract_address as a sender. others_strk_key?: StarknetAddress[]; @@ -177,7 +177,7 @@ A lot of cool features can be implemented in that's way I think. Pros: - Starting with a simple one Contract is better?   - Serve as an exemple and more easy to do. + Serve as an example and more easy to do. Cons: diff --git a/prototype/src/index.ts b/prototype/src/index.ts index ab2b818c..f3b88ff4 100644 --- a/prototype/src/index.ts +++ b/prototype/src/index.ts @@ -9,7 +9,7 @@ const app = express(); const port = process.env.PORT_SOCIALPAY || 8080; app.use(express.json()); -/*** Not finish and used, can serve as an exemple. +/*** Not finish and used, can serve as an example. * @escription Maybe not needed on the specs, if the Joyboy client serve as a Wallet. * * Endpoint to receive Nostr messages for Social pay diff --git a/prototype/test/tip_end_to_end.test.ts b/prototype/test/tip_end_to_end.test.ts index 3b3d3247..33451665 100644 --- a/prototype/test/tip_end_to_end.test.ts +++ b/prototype/test/tip_end_to_end.test.ts @@ -102,7 +102,7 @@ describe("End to end test", () => { // // 10 // // ); - // /** @description Uncomment to create your social account or comment and change your old contract in the constant ACCOUNT_TEST_PROFILE or direcly below***/ + // /** @description Uncomment to create your social account or comment and change your old contract in the constant ACCOUNT_TEST_PROFILE or directly below***/ // // console.log("create social account"); // // let accountBob = await createSocialContract(bobPublicKey); @@ -176,7 +176,7 @@ describe("End to end test", () => { // // console.log("New account:\nprivateKey=", AAprivateKeyAlice); // // const AAstarkKeyPubAlice = ec.starkCurve.getStarkKey(AAprivateKeyAlice); // // console.log("publicKey=", AAstarkKeyPubAlice); - // /** @description Uncomment to create your social account or comment and change your old contract in the constant ACCOUNT_TEST_PROFILE or direcly below***/ + // /** @description Uncomment to create your social account or comment and change your old contract in the constant ACCOUNT_TEST_PROFILE or directly below***/ // let pkAliceAccount = await socialAlice?.get_public_key(); // console.log("public key Alice Account", pkAliceAccount); diff --git a/prototype/utils/escrow.ts b/prototype/utils/escrow.ts index 43334059..a881f409 100644 --- a/prototype/utils/escrow.ts +++ b/prototype/utils/escrow.ts @@ -24,7 +24,7 @@ const PATH_SOCIAL_ACCOUNT_COMPILED = path.resolve( "../../onchain/target/dev/joyboy_DepositEscrow.compiled_contract_class.json" ); -/** @TODO spec need to be discuss. This function serve as an exemple */ +/** @TODO spec need to be discuss. This function serve as an example */ export const createEscrowAccount = async () => { try { // initialize existing predeployed account 0 of Devnet @@ -63,7 +63,7 @@ export const createEscrowAccount = async () => { // deploy account // const AAaccount = new Account(provider, AAcontractAddress, AAprivateKey); - /** @description uncomment this to declare your accout */ + /** @description uncomment this to declare your account */ // console.log("declare account"); console.log("try declare account"); const declareResponse = await account0.declare({ diff --git a/prototype/utils/social_account.ts b/prototype/utils/social_account.ts index 5fb6d545..50f20b70 100644 --- a/prototype/utils/social_account.ts +++ b/prototype/utils/social_account.ts @@ -16,7 +16,7 @@ const PATH_SOCIAL_ACCOUNT_COMPILED = path.resolve( "../../onchain/target/dev/joyboy_SocialAccount.compiled_contract_class.json" ); -/** @TODO spec need to be discuss. This function serve as an exemple */ +/** @TODO spec need to be discuss. This function serve as an example */ export const createSocialContract = async (nostrPublicKey: string) => { try { // initialize existing predeployed account 0 of Devnet @@ -71,7 +71,7 @@ export const createSocialContract = async (nostrPublicKey: string) => { // deploy account // const AAaccount = new Account(provider, AAcontractAddress, AAprivateKey); - /** @description uncomment this to declare your accout */ + /** @description uncomment this to declare your account */ // console.log("declare account"); // console.log("try declare account"); // const declareResponse = await account0.declare({ @@ -131,7 +131,7 @@ export const createSocialContract = async (nostrPublicKey: string) => { /** @TODO account SNIP-06 to finish. * Not finish with the SocialPay abi. - * spec need to be discuss. This function serve as an exemple */ + * spec need to be discuss. This function serve as an example */ export const createSocialAccount = async ( nostrPublicKey: string, AAprivateKey: string, @@ -191,7 +191,7 @@ export const createSocialAccount = async ( // ); // console.log("Answer mint =", answer); - /** @description uncomment this to declare your accout */ + /** @description uncomment this to declare your account */ console.log("declare account"); console.log("try declare account") const declareResponse = await account0.declare({ diff --git a/prototype/utils/token.ts b/prototype/utils/token.ts index bb319ac2..04665bf9 100644 --- a/prototype/utils/token.ts +++ b/prototype/utils/token.ts @@ -29,7 +29,7 @@ const PATH_TOKEN_COMPILED = path.resolve( "../../onchain/target/dev/joyboy_ERC20Upgradeable.compiled_contract_class.json" ); -/** @TODO spec need to be discuss. This function serve as an exemple */ +/** @TODO spec need to be discuss. This function serve as an example */ export const createToken = async () => { try { const privateKey0 = process.env.DEV_PK as string;