Skip to content

Commit

Permalink
Merge pull request #200 from storyprotocol/dev
Browse files Browse the repository at this point in the history
1.0.0-rc12
  • Loading branch information
edisonz0718 authored May 22, 2024
2 parents dc2d348 + b8f4b7a commit 65f9acc
Show file tree
Hide file tree
Showing 35 changed files with 8,090 additions and 6,052 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:

- name: Run Anvil
id: run_anvil
run: anvil --fork-url ${SEPOLIA_RPC_PROVIDER_URL} --block-time 1 --silent &
run: anvil --fork-url ${SEPOLIA_RPC_PROVIDER_URL} --silent &

- name: Check on Run Anvil
if: steps.run_anvil.outcome != 'success'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
name: External PR
name: Workflow for External PRs

on:
on:
pull_request_target:
types: [opened, synchronize]
branches:
- dev

jobs:
Timestamp_PR_CREATED:
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

authorize:
if: github.event.pull_request.head.repo.full_name != github.repository
needs: [ Timestamp_PR_CREATED ]
environment: 'external'
runs-on: ubuntu-latest
steps:
- run: true

Timestamp_PR_APPROVED:
needs: [ authorize ]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

build_and_test:
needs: authorize
uses: ./.github/workflows/build-and-test.yaml
with:
needs: [ authorize, Timestamp_PR_APPROVED ]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-test-workflow.yml@main
with:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: 'beta-sepolia'
secrets:
Expand All @@ -27,4 +38,4 @@ jobs:
SEPOLIA_TEST_WALLET_ADDRESS: ${{ secrets.SEPOLIA_TEST_WALLET_ADDRESS }}
STORY_TEST_NET_RPC_PROVIDER_URL: ${{ secrets.STORY_TEST_NET_RPC_PROVIDER_URL }}
STORY_TEST_NET_WALLET_PRIVATE_KEY: ${{ secrets.STORY_TEST_NET_WALLET_PRIVATE_KEY }}
STORY_TEST_NET_TEST_WALLET_ADDRESS: ${{ secrets.STORY_TEST_NET_TEST_WALLET_ADDRESS }}
STORY_TEST_NET_TEST_WALLET_ADDRESS: ${{ secrets.STORY_TEST_NET_TEST_WALLET_ADDRESS }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Internal PR
name: Workflow for internal PRs

on:
push:
Expand All @@ -11,9 +11,14 @@ on:
- dev

jobs:
build_and_test:

Timestamp:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: ./.github/workflows/build-and-test.yaml
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

build_and_test:
needs: [Timestamp]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-test-workflow.yml@main
with:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: 'beta-sepolia'
Expand Down
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 65f9acc

Please sign in to comment.