Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MSghais committed Jun 17, 2024
1 parent 6b7c505 commit 95df39a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions prototype/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions prototype/escrow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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[];
Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion prototype/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions prototype/test/tip_end_to_end.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions prototype/utils/escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down
8 changes: 4 additions & 4 deletions prototype/utils/social_account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion prototype/utils/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 95df39a

Please sign in to comment.