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

Error deploying Hybrid Custody contracts #716

Open
bthaile opened this issue Jul 17, 2023 · 1 comment
Open

Error deploying Hybrid Custody contracts #716

bthaile opened this issue Jul 17, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@bthaile
Copy link
Contributor

bthaile commented Jul 17, 2023

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"]}}}}

@bthaile bthaile added the Bug Something isn't working label Jul 17, 2023
@DylanTinianov
Copy link

DylanTinianov commented Aug 3, 2023

This issue is related to the address translation layer: onflow/flow-playground-api#315
Removing address translation should enable deployment of these contracts.

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