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

Gnosis Chain: API returns 'type': 'call' for delegate call #5901

Closed
72L opened this issue Aug 11, 2022 · 1 comment · Fixed by #5968
Closed

Gnosis Chain: API returns 'type': 'call' for delegate call #5901

72L opened this issue Aug 11, 2022 · 1 comment · Fixed by #5968
Assignees
Labels
api API endpoints enhancement New feature or request

Comments

@72L
Copy link

72L commented Aug 11, 2022

For delegate call internal transactions at endpoint ?module=account&action=txlistinternal&txhash={transactionHash}, the API returns type: 'call' when I would expect 'delegatecall'

Environment

  • BlockScout Version: v4.1.7-beta

Steps to reproduce

  • try this API call: https://blockscout.com/xdai/mainnet/api?module=account&action=txlistinternal&txhash=0xa809848cc0bfaf33e58eb8de026f096c7e5184acf7640a326d01aea36c018365

It produces:

{
   "message":"OK",
   "result":[
      {
         "blockNumber":"23498480",
         "contractAddress":"",
         "errCode":"",
         "from":"0x3de8b3e4672a4b5fc63fd2e401881ab1042fc4fd",
         "gas":"14973",
         "gasUsed":"1504",
         "index":"1",
         "input":"0x",
         "isError":"0",
         "timeStamp":"1659496915",
         "to":"0x3e5c63644e683549055b9be8653de26e0b4cd36e",
         "transactionHash":"0xa809848cc0bfaf33e58eb8de026f096c7e5184acf7640a326d01aea36c018365",
         "type":"call",
         "value":"8000000000000000000"
      }
   ],
   "status":"1"
}

image

I'm pretty sure the UI is correct given this is a Gnosis Safe using the Gnosis Safe Proxy contract in a delegate call

Expected Behaviour

The API should give "type": "delegatecall"

Actual Behaviour

The API gives "type": "call"

@vbaranov vbaranov added the api API endpoints label Aug 12, 2022
@vbaranov vbaranov self-assigned this Aug 22, 2022
@vbaranov vbaranov added the enhancement New feature or request label Aug 22, 2022
@vbaranov
Copy link
Member

@72L the type of this internal transaction is indeed call. What could be misleading here that API doesn't return callType., which is delegatecall for the referenced transaction. We will add callType in the reponse of the API endpoint as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API endpoints enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants