Skip to content

Commit

Permalink
Refactor metadata param in spg (#178)
Browse files Browse the repository at this point in the history
* Try modify ipAccount integration test

* Refactor metadata param

* Bump version to 1.0.0-rc.12

* Complete dispute integration tests

* Fix issue issue about PIL_TYPE type

* Import type from index in integration tests

* Clean up env variables and create a new env.example file

* Fix issue about commercialRevShare

* Remove resolve dispute in integration test and modify env example file

* Integrate signature in ipAsset

* Update README.md and delete makefile to update smart contract method

* Update pnpm-lock.yaml

* Fix RPC in the integration test

* Remove ipAccount reference in IpAsset module

* Replace localhost with 127.0.0.1

* Skip ipAccount.executeWithSig
  • Loading branch information
bonnie57 authored May 21, 2024
1 parent c123810 commit b8f4b7a
Show file tree
Hide file tree
Showing 31 changed files with 8,057 additions and 6,042 deletions.
31 changes: 0 additions & 31 deletions Makefile

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ The SDK supports using `viem` for initiating SDK client. Create a typescript fil
> :information-source: Make sure to have WALLET_PRIVATE_KEY set up in your .env file.
```typescript index.ts
import { privateKeyToAccount } from 'viem/accounts';
import { privateKeyToAccount } from "viem/accounts";

const PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || '0x';
const account = privateKeyToAccount(WALLET_PRIVATE_KEY as `0x${string}`);
const PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
const account = privateKeyToAccount(WALLET_PRIVATE_KEY as Address);
```

The preceding code created the `account` object for creating the SDK client.
Expand All @@ -54,7 +54,7 @@ To set up the SDK client, import `StoryClient` and `StoryConfig` from `@story-pr
> :information-source: Make sure to have RPC_PROVIDER_URL for your desired chain set up in your .env file. We recommend using the Sepolia network with `RPC_PROVIDER_URL=https://rpc.ankr.com/eth_sepolia`.
```typescript index.ts
import { StoryClient, StoryConfig } from '@story-protocol/core-sdk';
import { StoryClient, StoryConfig } from "@story-protocol/core-sdk";

const config: StoryConfig = {
transport: http(process.env.RPC_PROVIDER_URL),
Expand Down Expand Up @@ -100,9 +100,7 @@ In your testing environment:

## Steps to pull and compile latest Protocol Core & Periphery v1 Smart Contract ABIs (Currently pulls from the protocol-core-v1 and protocol-periphery-v1 `release-v1.x.x` branch)

Must have `solc` installed (https://docs.soliditylang.org/en/v0.8.23/installing-solidity.html)

- run `make compile_contracts`
- run `cd packages/wagmi-generator && npm run generate`

## Release

Expand Down
2 changes: 2 additions & 0 deletions packages/core-sdk/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SEPOLIA_TEST_WALLET_ADDRESS = 0x0000000000000000000000000000000000000000
SEPOLIA_WALLET_PRIVATE_KEY = 0x0000000000000000000000000000000000000000
6 changes: 2 additions & 4 deletions packages/core-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The SDK supports using `viem` for initiating SDK client. Create a typescript fil
import { privateKeyToAccount } from "viem/accounts";

const WALLET_PRIVATE_KEY = process.env.WALLET_PRIVATE_KEY || "0x";
const account = privateKeyToAccount(WALLET_PRIVATE_KEY as `0x${string}`);
const account = privateKeyToAccount(WALLET_PRIVATE_KEY as Address);
```

The preceding code created the `account` object for creating the SDK client.
Expand Down Expand Up @@ -100,9 +100,7 @@ In your testing environment:

## Steps to pull and compile latest smart contract ABIs (Currently pulls from the protocol-contracts `dev` branch)

Must have `solc` installed (https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html)

- run `make compile_contracts`
- run `cd packages/wagmi-generator && npm run generate`

## Release

Expand Down
2 changes: 1 addition & 1 deletion packages/core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@story-protocol/core-sdk",
"version": "1.0.0-rc.11",
"version": "1.0.0-rc.12",
"description": "Story Protocol Core SDK",
"main": "dist/story-protocol-core-sdk.cjs.js",
"module": "dist/story-protocol-core-sdk.esm.js",
Expand Down
Loading

0 comments on commit b8f4b7a

Please sign in to comment.