You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.16;
contract Calc {
address public owner;
uint256 public num;
function multiply(address addr) public returns (address) {
return addr;
}
}
The contract can be deployed, but when I call the multiply method: near call name_contract.testnet multiply '{"addr": "account1.testnet"}' --accountId name_contract.testnet
I get an error: Error: {"index":0,"kind":{"ExecutionError":"WebAssembly trap: An unreachable opcode was executed."}}
After the call: near call name_contract.testnet multiply '{"addr": "account1.testnet"}' --accountId name_contract.testnet
I expect to be returned the account passed in the function parameter: account1.testnet