Skip to content

Commit

Permalink
added buffer dependency (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
poocart authored Sep 27, 2023
1 parent 0a59bd4 commit 4a3da3a
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

## [1.2.10] - 2023-09-27
### Fixes
- Added `buffer` dependency to support both node and browser environments

## [1.2.9] - 2023-09-26
### New
- Added Mantle testnet

## [1.2.8] - 2023-09-21
### Fixes
- Fixed the issue with getExchangeOffers endpoint (Account must need to be deployed to access this endpoint)
Expand Down
62 changes: 62 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/prime-sdk",
"version": "1.2.9",
"version": "1.2.10",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand Down Expand Up @@ -53,8 +53,9 @@
"@lifi/sdk": "2.2.3",
"@nerdwallet/apollo-cache-policies": "1.2.1",
"@thehubbleproject/bls": "0.5.1",
"apollo-link-ws": "1.0.20",
"@walletconnect/universal-provider": "2.10.0",
"apollo-link-ws": "1.0.20",
"buffer": "^6.0.3",
"class-transformer": "0.5.1",
"class-validator": "0.14.0",
"commander": "10.0.1",
Expand All @@ -68,10 +69,10 @@
"@types/prettier": "2.7.3",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"dotenv": "16.0.3",
"eslint": "6.8.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.20.2",
"dotenv": "16.0.3",
"npm": "9.6.4",
"ts-node": "8.10.2",
"typescript": "4.5.2"
Expand Down
1 change: 1 addition & 0 deletions src/sdk/base/VerifyingPaymasterAPI.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ethers } from 'ethers';
import fetch from 'cross-fetch';
import { Buffer } from 'buffer';
import { calcPreVerificationGas } from './calcPreVerificationGas';
import { PaymasterAPI } from './PaymasterAPI';
import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount';
Expand Down
1 change: 1 addition & 0 deletions src/sdk/base/calcPreVerificationGas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { UserOperationStruct } from '../contracts/account-abstraction/contracts/

import { NotPromise, packUserOp } from '../common';
import { arrayify, hexlify } from 'ethers/lib/utils';
import { Buffer } from 'buffer';

export interface GasOverheads {
/**
Expand Down
3 changes: 2 additions & 1 deletion src/sdk/common/ERC4337Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defaultAbiCoder, hexConcat, hexlify, keccak256 } from 'ethers/lib/utils
import { EntryPoint__factory } from '../contracts';
import { UserOperationStruct } from '../contracts/account-abstraction/contracts/core/BaseAccount';
import { ethers } from 'ethers';
import { Buffer } from 'buffer';

const entryPointAbi: any = EntryPoint__factory.abi;

Expand Down Expand Up @@ -98,7 +99,7 @@ export function decodeErrorReason(error: string): DecodedError | undefined {
return {
message: formattedMessage,
opIndex,
};
};
}
}

Expand Down

0 comments on commit 4a3da3a

Please sign in to comment.