Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into rob/twitter
Browse files Browse the repository at this point in the history
  • Loading branch information
dphilipson committed Jan 10, 2025
2 parents 2cd20ea + 21acc9f commit 920e25f
Show file tree
Hide file tree
Showing 102 changed files with 4,058 additions and 587 deletions.
61 changes: 39 additions & 22 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ runs:
node-version: ${{ inputs.node-version }}
cache: yarn

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
with:
path: |
**/node_modules
!examples/embedded-accounts-quickstart
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-
# this cache isn't actually being used in actions... not sure why
# - name: Cache dependencies
# id: yarn-cache
# uses: actions/cache@v3
# with:
# path: |
# **/node_modules
# !examples/embedded-accounts-quickstart
# .yarn/install-state.gz
# key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
# ${{ runner.os }}-yarn-

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -66,13 +67,29 @@ runs:
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Clear Linux specific files
if: runner.os == 'Linux'
shell: bash
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
images=$(docker image ls -aq)
if [ -n "$images" ]; then
docker rmi $images
else
echo "No images to remove."
fi
df -h
# similarly, I'm not seeing this cache ever get used
# - name: Cache Gradle
# if: env.turbo_cache_hit != 1
# uses: actions/cache@v3
# with:
# path: |
# ~/.gradle/wrapper
# ~/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties') }}
# restore-keys: |
# ${{ runner.os }}-gradle-
41 changes: 33 additions & 8 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ jobs:
fetch-depth: "0"
submodules: "recursive"

- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- name: Setup
uses: ./.github/actions/setup

Expand All @@ -109,4 +101,37 @@ jobs:

- name: Unit Test
run: yarn test:ci

- name: Typecheck Test
run: yarn test:typecheck

build_ios:
name: Build iOS
runs-on: macos-14
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
API_KEY: ${{ secrets.API_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: "Checkout files"
uses: actions/checkout@v3
with:
token: ${{ secrets.ALCHEMY_BOT_PAT }}
fetch-depth: "0"
submodules: "recursive"

- name: Setup
uses: ./.github/actions/setup

- name: Install cocoapods
working-directory: account-kit/rn-signer/example/ios
run: |
pod install
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,7 @@ lib/
**/ios/generated
**/android/generated

Pods

vendor

3 changes: 3 additions & 0 deletions .vitest/vitest.shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { configDefaults, defineConfig } from "vitest/config";

export const sharedConfig = defineConfig({
test: {
typecheck: {
ignoreSourceErrors: true,
},
alias: {
"~test": join(__dirname, "./src"),
},
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08)

### Bug Fixes

- correctly trim implementation address ([#1261](https://github.com/alchemyplatform/aa-sdk/issues/1261)) ([5dae940](https://github.com/alchemyplatform/aa-sdk/commit/5dae940eee1c776b54804a9aac8d46fe51e89d19))
- lost changes from other PRs ([#1259](https://github.com/alchemyplatform/aa-sdk/issues/1259)) ([6546664](https://github.com/alchemyplatform/aa-sdk/commit/6546664887a45e8b25745a3cac539cde9473e4bf))
- maybe fix ci memory issue ([#1258](https://github.com/alchemyplatform/aa-sdk/issues/1258)) ([d92513e](https://github.com/alchemyplatform/aa-sdk/commit/d92513e2a5cf82c6857d9184ccb81c45d6ea799e))
- skip docker rmi if no images ([#1262](https://github.com/alchemyplatform/aa-sdk/issues/1262)) ([833fb8e](https://github.com/alchemyplatform/aa-sdk/commit/833fb8e485ba170073110814f510ca52db074ed0))

### Features

- add expo example ([#1204](https://github.com/alchemyplatform/aa-sdk/issues/1204)) ([bccb6e7](https://github.com/alchemyplatform/aa-sdk/commit/bccb6e7172fed90a24b5a875502cef3d0f660a8b))
- add expo otp example ([#1243](https://github.com/alchemyplatform/aa-sdk/issues/1243)) ([30d6443](https://github.com/alchemyplatform/aa-sdk/commit/30d6443af790055f66b5d8bb0676b51f72f61b3e))
- add ink mainnet ([#1225](https://github.com/alchemyplatform/aa-sdk/issues/1225)) ([0a6606e](https://github.com/alchemyplatform/aa-sdk/commit/0a6606e6a447f08406aa84308795118eda950531))
- add mekong devnet support ([#1239](https://github.com/alchemyplatform/aa-sdk/issues/1239)) ([baad28a](https://github.com/alchemyplatform/aa-sdk/commit/baad28a6b1df36f66eae1fb723bbcfdc61592a51))
- add otp and magic link example updates to the documentation ([#1247](https://github.com/alchemyplatform/aa-sdk/issues/1247)) ([1624def](https://github.com/alchemyplatform/aa-sdk/commit/1624defcd72b74b2272bff5ea40db93bc5cd4117))
- add OTP authentication capabilities to RN Signer ([#1231](https://github.com/alchemyplatform/aa-sdk/issues/1231)) ([6ebfca5](https://github.com/alchemyplatform/aa-sdk/commit/6ebfca58a7ef617d0915661171038daa0b497068))
- add otp example to bare rn app ([#1235](https://github.com/alchemyplatform/aa-sdk/issues/1235)) ([dbf4db9](https://github.com/alchemyplatform/aa-sdk/commit/dbf4db90b58220b184db388f43b2b2bded54d873))
- basic ma v2 sdk integrations ([#1220](https://github.com/alchemyplatform/aa-sdk/issues/1220)) ([e513d84](https://github.com/alchemyplatform/aa-sdk/commit/e513d84406acb9dcc72d30a12dce4fbd15adeab8)), closes [#1221](https://github.com/alchemyplatform/aa-sdk/issues/1221) [#1223](https://github.com/alchemyplatform/aa-sdk/issues/1223) [#1232](https://github.com/alchemyplatform/aa-sdk/issues/1232) [#1233](https://github.com/alchemyplatform/aa-sdk/issues/1233) [#1246](https://github.com/alchemyplatform/aa-sdk/issues/1246)
- **chains:** add ink and soneium mainnet ([#1215](https://github.com/alchemyplatform/aa-sdk/issues/1215)) ([de83640](https://github.com/alchemyplatform/aa-sdk/commit/de83640936bfa43f04fa274efda5a968afc4d773))
- **rn:** add iOS support ([#1210](https://github.com/alchemyplatform/aa-sdk/issues/1210)) ([2e3892c](https://github.com/alchemyplatform/aa-sdk/commit/2e3892cac57c517cb93d0349297feedd2ca07dfb))
- **rn:** implement RN iOS stamper ([#1213](https://github.com/alchemyplatform/aa-sdk/issues/1213)) ([f9e3e91](https://github.com/alchemyplatform/aa-sdk/commit/f9e3e912700c35456ecdf97fa68bd1beb182f0bf))
- update build workflow to delete unnecessary files before building ([#1240](https://github.com/alchemyplatform/aa-sdk/issues/1240)) ([d0b0924](https://github.com/alchemyplatform/aa-sdk/commit/d0b092425b09365a6acb0cb0cb798975577750d0))

# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ We are excited to have you contribute to the `aa-sdk`. Here's a step-by-step gui

- Use the Node version specified in `package.json` (currently 18.16.0). Run `node -v` to check your version.
- Build the project with `yarn build`.
- Run existing tests using `yarn test` to ensure everything is working correctly.
- Run existing tests using `yarn test` & `yarn test:typecheck` to ensure everything is working correctly.

4. **Make Changes**: Now, you can start making changes to the packages or docs. When updating or adding new functionality, update or add a new doc in `site/packages/*` corresponding to the package you have worked on to document the changes.

5. **Re-verify Tests**: After making your changes, re-run `yarn test` to ensure all tests still pass.
5. **Re-verify Tests**: After making your changes, re-run `yarn test` & `yarn test:typecheck` to ensure all tests still pass.

6. **Code Formatting**:

Expand Down
11 changes: 11 additions & 0 deletions aa-sdk/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08)

### Bug Fixes

- correctly trim implementation address ([#1261](https://github.com/alchemyplatform/aa-sdk/issues/1261)) ([5dae940](https://github.com/alchemyplatform/aa-sdk/commit/5dae940eee1c776b54804a9aac8d46fe51e89d19))
- lost changes from other PRs ([#1259](https://github.com/alchemyplatform/aa-sdk/issues/1259)) ([6546664](https://github.com/alchemyplatform/aa-sdk/commit/6546664887a45e8b25745a3cac539cde9473e4bf))

### Features

- basic ma v2 sdk integrations ([#1220](https://github.com/alchemyplatform/aa-sdk/issues/1220)) ([e513d84](https://github.com/alchemyplatform/aa-sdk/commit/e513d84406acb9dcc72d30a12dce4fbd15adeab8)), closes [#1221](https://github.com/alchemyplatform/aa-sdk/issues/1221) [#1223](https://github.com/alchemyplatform/aa-sdk/issues/1223) [#1232](https://github.com/alchemyplatform/aa-sdk/issues/1232) [#1233](https://github.com/alchemyplatform/aa-sdk/issues/1233) [#1246](https://github.com/alchemyplatform/aa-sdk/issues/1246)

# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16)

**Note:** Version bump only for package @aa-sdk/core
Expand Down
3 changes: 2 additions & 1 deletion aa-sdk/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aa-sdk/core",
"license": "MIT",
"version": "4.7.0",
"version": "4.8.0",
"description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
"author": "Alchemy",
"type": "module",
Expand All @@ -17,6 +17,7 @@
"!vitest.config.ts",
"!.env",
"!src/**/*.test.ts",
"!src/**/*.test-d.ts",
"!src/__tests__/**/*"
],
"exports": {
Expand Down
5 changes: 3 additions & 2 deletions aa-sdk/core/src/account/smartContractAccount.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
getContract,
hexToBytes,
trim,
type Address,
type Chain,
type CustomSource,
Expand Down Expand Up @@ -483,7 +482,9 @@ export async function toSmartContractAccount(
);
}

return trim(storage);
// The storage slot contains a full bytes32, but we want only the last 20 bytes.
// So, slice off the leading `0x` and the first 12 bytes (24 characters), leaving the last 20 bytes, then prefix with `0x`.
return `0x${storage.slice(26)}`;
};

if (entryPoint.version !== "0.6.0" && entryPoint.version !== "0.7.0") {
Expand Down
2 changes: 1 addition & 1 deletion aa-sdk/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.7.0";
export const VERSION = "4.8.0";
1 change: 1 addition & 0 deletions aa-sdk/core/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"node_modules",
"**/*/__tests__",
"**/*/*.test.ts",
"**/*/*.test-d.ts",
"**/*/*.e2e.test.ts",
"vitest.config.ts",
"vitest.config.e2e.ts"
Expand Down
4 changes: 4 additions & 0 deletions aa-sdk/ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08)

**Note:** Version bump only for package @aa-sdk/ethers

# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16)

**Note:** Version bump only for package @aa-sdk/ethers
Expand Down
7 changes: 4 additions & 3 deletions aa-sdk/ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aa-sdk/ethers",
"license": "MIT",
"version": "4.7.0",
"version": "4.8.0",
"description": "Ethers.js wrapper for @aa-sdk/core",
"author": "Alchemy",
"type": "module",
Expand All @@ -17,6 +17,7 @@
"!.env",
"!dist/**/*.tsbuildinfo",
"!src/**/*.test.ts",
"!src/**/*.test-d.ts",
"!src/__tests__/**/*"
],
"exports": {
Expand All @@ -41,15 +42,15 @@
"test:run": "vitest run"
},
"devDependencies": {
"@account-kit/smart-contracts": "^4.7.0",
"@account-kit/smart-contracts": "^4.8.0",
"alchemy-sdk": "^3.0.0",
"dotenv": "^16.0.3",
"typescript": "^5.0.4",
"typescript-template": "*",
"vitest": "^2.0.4"
},
"dependencies": {
"@aa-sdk/core": "^4.7.0",
"@aa-sdk/core": "^4.8.0",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
Expand Down
1 change: 1 addition & 0 deletions aa-sdk/ethers/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"**/*/__tests__",
"**/*/*.e2e.test.ts",
"**/*/*.test.ts",
"**/*/*.test-d.ts",
"vitest.config.ts"
],
"include": ["src"],
Expand Down
4 changes: 4 additions & 0 deletions account-kit/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08)

**Note:** Version bump only for package @account-kit/core

# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16)

### Features
Expand Down
11 changes: 6 additions & 5 deletions account-kit/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/core",
"version": "4.7.0",
"version": "4.8.0",
"description": "Core library for account kit that provides state management and framework indepednent abstractions across infra, Alchemy Signer, and Smart Contracts",
"author": "Alchemy",
"license": "MIT",
Expand All @@ -18,6 +18,7 @@
"!vitest.config.ts",
"!.env",
"!src/**/*.test.ts",
"!src/**/*.test-d.ts",
"!src/__tests__/**/*"
],
"exports": {
Expand Down Expand Up @@ -45,10 +46,10 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@account-kit/infra": "^4.7.0",
"@account-kit/logging": "^4.7.0",
"@account-kit/signer": "^4.7.0",
"@account-kit/smart-contracts": "^4.7.0",
"@account-kit/infra": "^4.8.0",
"@account-kit/logging": "^4.8.0",
"@account-kit/signer": "^4.8.0",
"@account-kit/smart-contracts": "^4.8.0",
"js-cookie": "^3.0.5",
"zod": "^3.22.4",
"zustand": "^5.0.0-rc.2"
Expand Down
2 changes: 1 addition & 1 deletion account-kit/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.7.0";
export const VERSION = "4.8.0";
1 change: 1 addition & 0 deletions account-kit/core/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"node_modules",
"**/*/__tests__",
"**/*/*.test.ts",
"**/*/*.test-d.ts",
"**/*/*.e2e.test.ts",
"vitest.config.ts",
"vitest.config.e2e.ts"
Expand Down
8 changes: 8 additions & 0 deletions account-kit/infra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.8.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.7.0...v4.8.0) (2025-01-08)

### Features

- add ink mainnet ([#1225](https://github.com/alchemyplatform/aa-sdk/issues/1225)) ([0a6606e](https://github.com/alchemyplatform/aa-sdk/commit/0a6606e6a447f08406aa84308795118eda950531))
- add mekong devnet support ([#1239](https://github.com/alchemyplatform/aa-sdk/issues/1239)) ([baad28a](https://github.com/alchemyplatform/aa-sdk/commit/baad28a6b1df36f66eae1fb723bbcfdc61592a51))
- **chains:** add ink and soneium mainnet ([#1215](https://github.com/alchemyplatform/aa-sdk/issues/1215)) ([de83640](https://github.com/alchemyplatform/aa-sdk/commit/de83640936bfa43f04fa274efda5a968afc4d773))

# [4.7.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.6.1...v4.7.0) (2024-12-16)

**Note:** Version bump only for package @account-kit/infra
Expand Down
Loading

0 comments on commit 920e25f

Please sign in to comment.