Skip to content

anchor-beta failed in substreams build #586

@akkien

Description

@akkien

I use mode anchor-beta in substreams init. When I run substreams build, I get below error

value borrowed here after move
move occurs because `data` has type `Vec<u8>`, which does not implement the `Copy` trait

Some instructions in /idls/program.json may cause this error. I think so because when I remove them, the error is gone.
Below is one of my instruction:

 {
      "name": "swap_sol_for_tokens",
      "discriminator": [1, 171, 24, 135, 201, 236, 210, 219],
      "accounts": [
        { "name": "user", "writable": true, "signer": true },
        { "name": "sol_mint", "address": "So11111111111111111111111111111111111111112" },
        {
          "name": "user_wsol_ata",
          "writable": true,
          "pda": {
            "seeds": [
              { "kind": "account", "path": "user" },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              { "kind": "account", "path": "sol_mint" }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        { "name": "receiver_dst_ata", "writable": true },
        {
          "name": "unizen_wsol_ata",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  24, 152, 160, 138, 33, 56, 93, 59, 237, 182, 194, 219, 97, 107, 73, 160, 106, 195, 92, 41, 233, 25,
                  250, 88, 146, 162, 33, 44, 229, 235, 52, 60
                ]
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95,
                  91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              { "kind": "account", "path": "sol_mint" }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16,
                132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        { "name": "integrator_wsol_ata", "writable": true },
        { "name": "jupiter_program", "address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4" },
        { "name": "token_program", "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" },
        { "name": "system_program", "address": "11111111111111111111111111111111" }
      ],
      "args": [
        { "name": "amount_in", "type": "u64" },
        { "name": "amount_out_min", "type": "u64" },
        { "name": "fee_percent", "type": "u64" },
        { "name": "share_percent", "type": "u64" },
        { "name": "data", "type": "bytes" }
      ]
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions