Skip to content

Fail to use ZkEvmSignTypedDataV4 - Request failed with status code 400 #526

@BestStream

Description

@BestStream

I receive this error “Failed to retrieve transaction receipt: Message failed to validate with error: Request failed with status code 400” when I make the following call:

Nethereum.ABI.EIP712.TypedData<Nethereum.ABI.EIP712.Domain> typedData = NethereumManager.GetTypedData(...);
string data = Nethereum.ABI.EIP712.TypedDataRawJsonConversion.ToJson(typedData);
string signature = await _passport.ZkEvmSignTypedDataV4(data);

But when I do the same with MetaMask, everything works fine.

Nethereum.ABI.EIP712.TypedData<Nethereum.ABI.EIP712.Domain> typedData = NethereumManager.GetTypedData(...);
string data = Nethereum.ABI.EIP712.TypedDataRawJsonConversion.ToJson(typedData);
var request = new EthSignTypedDataV4UnityRequest(GetRequestClientFactory());
yield return request.SendRequest(data);

So it seems there is a problem with ZkEvmSignTypedDataV4 method, or I don't understand how to use it correctly. Please help.

LOG:
[Immutable] [Browser Communications Manager] Call zkEvmSignTypedDataV4 (request ID: 2773fcac-fe61-4097-930c-9c8589825f10): {
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"OrderComponents": [
{
"name": "offerer",
"type": "address"
},
{
"name": "zone",
"type": "address"
},
{
"name": "offer",
"type": "OfferItem[]"
},
{
"name": "consideration",
"type": "ConsiderationItem[]"
},
{
"name": "orderType",
"type": "uint8"
},
{
"name": "startTime",
"type": "uint256"
},
{
"name": "endTime",
"type": "uint256"
},
{
"name": "zoneHash",
"type": "bytes32"
},
{
"name": "salt",
"type": "uint256"
},
{
"name": "conduitKey",
"type": "bytes32"
},
{
"name": "counter",
"type": "uint256"
}
],
"OfferItem": [
{
"name": "itemType",
"type": "uint8"
},
{
"name": "token",
"type": "address"
},
{
"name": "identifierOrCriteria",
"type": "uint256"
},
{
"name": "startAmount",
"type": "uint256"
},
{
"name": "endAmount",
"type": "uint256"
}
],
"ConsiderationItem": [
{
"name": "itemType",
"type": "uint8"
},
{
"name": "token",
"type": "address"
},
{
"name": "identifierOrCriteria",
"type": "uint256"
},
{
"name": "startAmount",
"type": "uint256"
},
{
"name": "endAmount",
"type": "uint256"
},
{
"name": "recipient",
"type": "address"
}
]
},
"primaryType": "OrderComponents",
"domain": {
"name": "Seaport",
"version": "1.1",
"chainId": 13473,
"verifyingContract": "0x719d406Ed3873785f10F446D7aCD9dE5BdF3De3d"
},
"message": {
"offerer": "0x87adb820e026964f8e6a70762a24804de00bede1",
"zone": "0x54536b38F7644d1F34F3Ec5d172Db932F6783eb5",
"offer": [
{
"itemType": 1,
"token": "0x978a0D022f6dF0A8FD5144604950e3bAd5516A66",
"identifierOrCriteria": 0,
"startAmount": 1000000000,
"endAmount": 1000000000
}
],
"consideration": [
{
"itemType": 3,
"token": "0x93dB040b93Cb7c79FB45fdEf9A6FA5C653d9611E",
"identifierOrCriteria": 18,
"startAmount": 1,
"endAmount": 1,
"recipient": "0x87adb820e026964f8e6a70762a24804de00bede1"
},
{
"itemType": 1,
"token": "0x978a0D022f6dF0A8FD5144604950e3bAd5516A66",
"identifierOrCriteria": 0,
"startAmount": 50000000,
"endAmount": 50000000,
"recipient": "0x2fd852c9a9aBb66788F96955E9928aEF3D71aE98"
}
],
"orderType": 0,
"startTime": 1752827402,
"endTime": 2068360202,
"zoneHash": "AA==",
"salt": 150806316,
"conduitKey": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
"counter": 0
}
}

[Immutable] [Browser Communications Manager] Response for: zkEvmSignTypedDataV4 (request ID: 2773fcac-fe61-4097-930c-9c8589825f10) : {"responseFor":"zkEvmSignTypedDataV4","requestId":"2773fcac-fe61-4097-930c-9c8589825f10","success":false,"error":"Message failed to validate with error: Request failed with status code 400","errorType":null}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions