solang
solang copied to clipboard
Can not pass array variable to `create_program_address()`
Describe the bug
error: conversion from bytes[] to bytes[] not possible
┌─ test.sol:9:39
│
9 │ return create_program_address(seeds, token);
│
To Reproduce
Compile the attached source code with solang compile --target solana test.sol
Expected behavior
create_program_address()
should be able to accept array variables.
Hyperledger Solang version v0.3.3
Include the complete solidity source code The following example is derived from the documentation.
import {create_program_address} from 'solana';
contract pda {
address token = address"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
function create_pda(bytes seed2) public returns (address) {
bytes[] seeds = ["kabang", seed2];
return create_program_address(seeds, token);
}
}