Skip to content

Can't execute a Solana program compiled from Solidity code with Solang #59

@reselbob

Description

@reselbob

Hi:

I am trying to exercise a Solana program I migrated from Solidity using Solang.

I keep getting this error:

Error: SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: invalid program argument
    at Connection.sendEncodedTransaction (/home/reselbob/Documents/solidity-to-solana/node_modules/@solana/web3.js/lib/index.cjs.js:9560:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (/home/reselbob/Documents/solidity-to-solana/node_modules/@solana/web3.js/lib/index.cjs.js:9526:20)
    at async Connection.sendTransaction (/home/reselbob/Documents/solidity-to-solana/node_modules/@solana/web3.js/lib/index.cjs.js:9517:12)
    at async sendAndConfirmTransaction (/home/reselbob/Documents/solidity-to-solana/node_modules/@solana/web3.js/lib/index.cjs.js:2145:21)
    at async callGetMessage (/home/reselbob/Documents/solidity-to-solana/scripts/SayHi.js:50:20) {
  logs: [
    'Program 5FWPj98F4TEfSvWxqYXQW4whdoLXTN2yeXfCJWfY7EjL invoke [1]',
    'Program 5FWPj98F4TEfSvWxqYXQW4whdoLXTN2yeXfCJWfY7EjL consumed 34 of 200000 compute units',
    'Program 5FWPj98F4TEfSvWxqYXQW4whdoLXTN2yeXfCJWfY7EjL failed: invalid program argument'
  ]
}

I demonstrate the issue in this 4 minute video.

For purposes of research, I am intentionally avoiding using Anchor.

Here is the Solidity code that I migrated.

Here is the client script I used to try to execute the program.

Here is the entire project on GitHub.

If the problem is due to some mistake on my part, in all sincerity I ask your forgiveness.

For what it's worth, this problem has been plaguing me for days.

Thanks in advance for any help and direction you can provide.

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