question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transaction signed by contract failing with code 500

See original GitHub issue

Describe the bug Hello, I’m trying to use a contract to generate signature for a transaction and trying to send it to Gnosis Safe transaction service. It is working when EOA signs the transaction, but it fails with error code 500 when the same thing is done using contract. The contract is implementing EIP 1271 isValidSignature for signature verification.

To Reproduce Steps to reproduce the behavior:

  1. Do POST on ‘https://safe-transaction.rinkeby.gnosis.io/api/v1/safes/0x2E46E481d57477A0663a7Ec61E7eDc65F4cb7F5C/transactions/
  2. Data:-
{
  "safe": "0x2E46E481d57477A0663a7Ec61E7eDc65F4cb7F5C",
  "to": "0xc68285210a663D10Ea66EAd1564cf6Ae83C8b3c3",
  "value": 0,
  "data": "0xbab29e0c",
  "operation": 0,
  "safeTxGas": 136123,
  "baseGas": 0,
  "gasPrice": 0,
  "nonce": 1,
  "contractTransactionHash": "0x74ce4479d935d3cc117e4aacbe756ebd06da34136ef3950d4a9a7e0e9f7013a6",
  "sender": "0xd5aa96b0E4649694308E98c4613b1822Ff7a0eC8",
  "signature": "0x000000000000000000000000d5aa96b0E4649694308E98c4613b1822Ff7a0eC800000000000000000000000000000000000000000000000000000000000000410000000000000000000000000000000000000000000000000000000000000000202290dc5085e3ccb19eebc96131752065a4d77f397887335181aae9fab8fdea78"
}
  1. The contract is deployed on rinkeby at address - 0xd5aa96b0E4649694308E98c4613b1822Ff7a0eC8
  2. The contract can be found here - https://gist.github.com/codebuster22/8dfa8c32804a598192cb7aa5fa93642d

Expected behavior Expected behavior was code 201, that is success and I should see the transaction created on the Gnosis Safe App.

Additional context I have been trying to create a contract signature for a week now, so it would be great to know if the error is with the signature and if it is what should be improved. Also, I won’t be doing any transaction from the safe so the nonce doesn’t change until it is diagnosed. Thank You in Advance.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
codebuster22commented, Jun 10, 2021

I’m new to this contract signatures, can I get some feedback on the signature I created. Maybe if I can know what I did wrong. The way I have structured is :- 0x{32-bytes padded address that implements EIP-1271}{32-bytes data-position, position of signature length}{1-byte signature type}{32-bytes length of signature}{bytes signature}

0reactions
Uxio0commented, Jun 10, 2021

EIP1271 has updated its value to 0x1626ba7e, I will update that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Private transaction failing with Non-200 status code
Sending private messages to a particular public key is failing. It was working till last week. No code or configuration changes have been...
Read more >
What is a 500 Internal Server Error? - Allconnect.com
The 500 Internal Server Error is simply a general indication that something's wrong on the server side. Several things could cause this, but ......
Read more >
Unable to send transactions with quorum nodes using tessera
Take a look in the quorum logs. There should be a message detailing why the contract creation failed. You may also need to...
Read more >
Transaction processing for endorser [localhost:7051 ... - GitHub
Error: Failed to execute transaction: Transaction processing for endorser [localhost:7051]: Chaincode status Code: (500) UNKNOWN. Description: failed to execute ...
Read more >
Understanding and resolving MetaMask error codes
This error means the requested resource does exist, but it's currently unavailable at the time of the request. This can occur when we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found