Invalid type for Argument in Test Function Call #7507
Unanswered
DhruvPareek
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there, I'm trying to run some tests on a simple smart contract that uses Chainlink Functions. This is the very simple smart contract:
And this is the specific function that I am testing from that smart contract:
So I am just trying to pass it a subscriptionId and the array element to access via a test and save the returned requestId to log to console. However, the following test file:
Returns this error:
Compiler run failed: Error (9553): Invalid type for argument in function call. Invalid implicit conversion from string[1] memory to string[] memory requested. --> test/RetrieveEmailTest.t.sol:16:53: | 16 | requestId = retrieveEmail.sendRequest(2045, ["1"]); | ^^^^^
I Also have tried requestId = retrieveEmail.sendRequest(2045, "[1]"); and got the same error. Haven't been able to figure out what this error means or any possible ways to solve it yet.
Beta Was this translation helpful? Give feedback.
All reactions