Giter Club home page Giter Club logo

Comments (7)

ardaerturk avatar ardaerturk commented on June 13, 2024

Additional context:

we are using [email protected]
and [email protected]

from permissionless.js.

plusminushalf avatar plusminushalf commented on June 13, 2024

hey are you using es2022?

from permissionless.js.

nbailo avatar nbailo commented on June 13, 2024

I can confirm, es2022 helped to resolve the same issue for me few days ago

from permissionless.js.

ardaerturk avatar ardaerturk commented on June 13, 2024

I've switched it to es2022 from es2020, I'm getting 40 different errors from permissionless now:

/node_modules/permissionless/actions/smartAccount/sendTransaction.ts
114:8-21
[tsl] ERROR in /node_modules/permissionless/actions/smartAccount/sendTransaction.ts(114,9)
      TS2375: Type '{ sender: `0x${string}`; paymasterAndData: "0x"; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; callData: `0x${string}`; nonce: bigint | undefined; }' is not assignable to type 'PartialBy<UserOperation, "sender" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Type '{ sender: `0x${string}`; paymasterAndData: "0x"; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; callData: `0x${string}`; nonce: bigint | undefined; }' is not assignable to type 'Partial<Pick<UserOperation, "sender" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
    Types of property 'nonce' are incompatible.
      Type 'bigint | undefined' is not assignable to type 'bigint'.
        Type 'undefined' is not assignable to type 'bigint'.

ERROR in node_modules/permissionless/actions/smartAccount/signTypedData.ts
137:46-56
[tsl] ERROR in node_modules/permissionless/actions/smartAccount/signTypedData.ts(137,47)
      TS2379: Argument of type '{ domain: ((TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes[${string}]`]: undefined; [x: `bytes32[${string}]`]: undefined; [x: `bool[${st...' is not assignable to parameter of type '{ domain?: TypedDataDomain; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Types of property 'domain' are incompatible.
    Type '((TTypedData extends { [x: string]: readonly TypedDataParameter[]; [x: `string[${string}]`]: undefined; [x: `function[${string}]`]: undefined; [x: `address[${string}]`]: undefined; [x: `uint256[${string}]`]: undefined; [x: `bytes[${string}]`]: undefined; [x: `bytes32[${string}]`]: undefined; [x: `bool[${string}]`]: ...' is not assignable to type 'TypedDataDomain'.
      Type 'undefined' is not assignable to type 'TypedDataDomain'.

ERROR in /node_modules/permissionless/actions/smartAccount/sendTransactions.ts
118:8-21
[tsl] ERROR in /node_modules/permissionless/actions/smartAccount/sendTransactions.ts(118,9)
      TS2375: Type '{ sender: `0x${string}`; paymasterAndData: "0x"; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; callData: `0x${string}`; nonce: bigint | undefined; }' is not assignable to type 'PartialBy<UserOperation, "sender" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Type '{ sender: `0x${string}`; paymasterAndData: "0x"; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; callData: `0x${string}`; nonce: bigint | undefined; }' is not assignable to type 'Partial<Pick<UserOperation, "sender" | "nonce" | "maxFeePerGas" | "maxPriorityFeePerGas" | "initCode" | "callGasLimit" | "verificationGasLimit" | "preVerificationGas" | "paymasterAndData" | "signature">>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
    Types of property 'nonce' are incompatible.
      Type 'bigint | undefined' is not assignable to type 'bigint'.
        Type 'undefined' is not assignable to type 'bigint'.

from permissionless.js.

plusminushalf avatar plusminushalf commented on June 13, 2024

Which version are you using?

from permissionless.js.

ardaerturk avatar ardaerturk commented on June 13, 2024

"permissionless": "^0.0.34"

from permissionless.js.

plusminushalf avatar plusminushalf commented on June 13, 2024

Hey so with viem 2.x.x you will have to use permissionless 0.1.x

from permissionless.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.