amountOfTokensToMint (uint256) not working
Closed this issue · 3 comments
The function has access controls, specifically:
/**
* @notice Sends an HTTP request for character information
* @dev If you pass 0, that will act just as a way to get an updated portfolio balance
* @return requestId The ID of the request
*/
function sendMintRequest(uint256 amountOfTokensToMint)
external
onlyOwner // HERE
whenNotPaused // HERE
returns (bytes32 requestId)
{
So only the owner can mint tokens. You are likely not using the owner account.
Please, please, please test this all locally before attempting to do transactions with this codebase on-chain.
@PatrickAlphaC I took off the access controls as part of my testing and I was still running into the following above issues. I am currently in the process of testing locally.
As, @PatrickAlphaC has mentioned, instead of testing on actual testnet, you should test using local anvil node. And also, instead of interacting with the functions via scripts, first test the functions using the targeted unit tests.
In the Base_Test.t.sol
file, there's a test named as testCanSendMintRequestWithTslaBalance
.
So, when you're executing that test using the command:
forge test --match-test testCanSendMintRequestWithTslaBalance
What is the error that you're getting in your console?