Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'abi') #823

Closed
carlomigueldy opened this issue May 27, 2024 · 9 comments
Closed

Cannot read properties of undefined (reading 'abi') #823

carlomigueldy opened this issue May 27, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@carlomigueldy
Copy link

carlomigueldy commented May 27, 2024

Description

I am trying to propose a custom transaction supplied encoded function data in batch to my Safe programmatically in backend, I have followed everything from the docs, yet it's throwing an exception when I call init from protocol-kit package.

Environment

  • Safe Core SDK version: ^4.0.0
  • Safe contract version: not sure
  • Environment:
    • browser
    • non-browser

Steps to reproduce

If applicable, please provide a screenshot or small video reproducing the bug.
Provide as much information as necessary to reproduce the bug.

Check the gist here.

Expected result

Should get something like this.

image

Additional context

Add any other context about the problem here.

@dasanra dasanra added the bug Something isn't working label May 27, 2024
@dasanra
Copy link
Collaborator

dasanra commented May 27, 2024

Could you please share which chain you are trying to use?

I also see you are having a custom @app/contracts which you are not setting in the Safe.init, may be related if you are using something custom.

@carlomigueldy
Copy link
Author

I am using Base Sepolia chain 84532 @dasanra

@carlomigueldy
Copy link
Author

@dasanra I use @app/constants import in here (not @app/contracts btw), to get the safe address from my constants

image

@dasanra
Copy link
Collaborator

dasanra commented May 27, 2024

Could you share which specific versions you are using from

@safe-global/api-kit
@safe-global/protocol-kit
@safe-global/safe-core-sdk-types

I'm not able to get the same error locally.

The gist you shared seems fine, as long as the Safe is already deployed.

@carlomigueldy
Copy link
Author

Here ya go man @dasanra

{
   ...
    "@safe-global/api-kit": "^2.4.0",
    "@safe-global/protocol-kit": "^4.0.0",
    "@safe-global/safe-core-sdk-types": "^4.0.2",
   ...
}

@dasanra
Copy link
Collaborator

dasanra commented May 27, 2024

Could you please push @safe-global/safe-core-sdk-types to the latest v5?

That should solve the issue

@carlomigueldy
Copy link
Author

Alright, sec will give it a try

@carlomigueldy
Copy link
Author

carlomigueldy commented May 27, 2024

It worked @dasanra, however now getting a different exception. It's an out of scope of this issue, but maybe you have some ideas?

EDIT: Created a separate issue instead on #829

[App] - 5/27/2024, 11:16:29 PM VERBOSE  [SafeAppService.proposeTransaction]: Initializing protocol kit +0ms
[App] - 5/27/2024, 11:16:31 PM VERBOSE  [SafeAppService.proposeTransaction]: Creating safe transaction +2s
[App] - 5/27/2024, 11:16:31 PM VERBOSE  [SafeAppService.proposeTransaction]: Getting safe transaction hash +578ms
[App] - 5/27/2024, 11:16:32 PM VERBOSE  [SafeAppService.proposeTransaction]: Signing the transaction hash +206ms
[App] - 5/27/2024, 11:16:32 PM VERBOSE  [SafeAppService.proposeTransaction]: Proposing the transaction to safe +5ms
[App] - 5/27/2024, 11:16:32 PM   ERROR  [SafeAppService.proposeTransaction]: Error while proposing transaction request to https://safe-transaction-base-sepolia.safe.global/api/v1/safes/0x3DbE5B38d41394A756246997407408b421937c7B/multisig-transactions/ failed, reason: write EPROTO 4078382E9E7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
 - {
  type: 'system',
  errno: 'EPROTO',
  code: 'EPROTO',
  stack: 'FetchError: request to https://safe-transaction-base-sepolia.safe.global/api/v1/safes/0x3DbE5B38d41394A756246997407408b421937c7B/multisig-transactions/ failed, reason: write EPROTO 4078382E9E7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:\n' +
    '\n' +
    '    at ClientRequest.<anonymous> (/home/carlomigueldy/dev/limitless-labs-group/limitless-exchange-api/node_modules/.pnpm/[email protected]/node_modules/node-fetch/lib/index.js:1501:11)\n' +
    '    at ClientRequest.emit (node:events:519:28)\n' +
    '    at TLSSocket.socketErrorListener (node:_http_client:500:9)\n' +
    '    at TLSSocket.emit (node:events:519:28)\n' +
    '    at emitErrorNT (node:internal/streams/destroy:169:8)\n' +
    '    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:82:21)'
} +497ms

@dasanra
Copy link
Collaborator

dasanra commented May 27, 2024

Let's close this one and continue the discussion in the new one that you created

@dasanra dasanra closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants