Error deploying Hybrid Custody contracts
In playground https://play.flow.com/d0ae9fd0-2d74-479d-bc93-71770f5a233b
Summary: Trying to create template for hybrid custody contracts. There is a vague Error when trying to deploy AddressUtils contract. ArrayUtils and StringUtils contracts deployed without an issue.
"errors": [
{
"message": "something went wrong, we are looking into the issue",
"path": [
"createContractDeployment"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
],
"data": null,
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
Response from Server
https://github.com/onflow/hybrid-custody-scaffold/blob/main/cadence/contracts/flow-utils/AddressUtils.cdc contract code This seems to be the problem code, when I remove items in the array, the contract deploys. if only "0x00001" value in array the contract deploys.
var parityCheckMatrixColumns: [UInt64] = [
0x00001, 0x00002, 0x00004, 0x00008, 0x00010, 0x00020, 0x00040, 0x00080,
0x00100, 0x00200, 0x00400, 0x00800, 0x01000, 0x02000, 0x04000, 0x08000,
0x10000, 0x20000, 0x40000, 0x7328d, 0x6689a, 0x6112f, 0x6084b, 0x433fd,
0x42aab, 0x41951, 0x233ce, 0x22a81, 0x21948, 0x1ef60, 0x1deca, 0x1c639,
0x1bdd8, 0x1a535, 0x194ac, 0x18c46, 0x1632b, 0x1529b, 0x14a43, 0x13184,
0x12942, 0x118c1, 0x0f812, 0x0e027, 0x0d00e, 0x0c83c, 0x0b01d, 0x0a831,
0x0982b, 0x07034, 0x0682a, 0x05819, 0x03807, 0x007d2, 0x00727, 0x0068e,
0x0067c, 0x0059d, 0x004eb, 0x003b4, 0x0036a, 0x002d9, 0x001c7, 0x0003f
]
running locally server output is
Failed to deploy contract {"timestamp":"2023-07-27T20:15:42Z","message":"GQL Request Client Error: \u003cnil\u003e err = input: createContractDeployment failed to deploy contract: Parsing failed:\nerror: unexpected token in import declaration: got decimal integer, expected string, address, or identifier\n --\u003e :1:24\n |\n1 | import StringUtils from 4x45\n | ^\n","severity":"WARNING","context":{"data":{"error":{"message":"failed to deploy contract: Parsing failed:\nerror: unexpected token in import declaration: got decimal integer, expected string, address, or identifier\n --\u003e :1:24\n |\n1 | import StringUtils from 4x45\n | ^\n","path":["createContractDeployment"]}}}}
This issue is related to the address translation layer: https://github.com/onflow/flow-playground-api/issues/315 Removing address translation should enable deployment of these contracts.