I am an experienced developer but relatively new to blockchain development. There is a close source contract that I can interact with via the provider's web interface. The screenshot below is the receipt of one of the transactions.
If I can work out what the params are and inject my own data, how do I make a call to this contract from my own contract (in Solidity)?
Update: As pointed out by Alex's answer, the screenshot above is the event emitted by the contract, not the function call metadata. The new screenshot below is of the transaction overview with Input Data.
I'm now trying to figure out how to make a call to this payable function using the suggested code below:
contract CallsFunctions {
// for when you want to call any function on any contract
function callAnything(address contractAddress, bytes memory args) payable external {
(bool success, ) = contractAddress.call{ gas: 100000, value: msg.value }(args);
require(success);
}
}
In Remix, when I attempt to make a transaction, I get the following error:
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }
I have confirmed that the input data (args) is correct by attempting to make a transaction from the provider's web interface, then copy/paste the pre-signed data into Remix. I tried this on a test net with a custom callee contract and it worked fine.
Update: I tried to deploy a custom callee contract that disallows other contracts, the call returned the same error. I have came to a conclusion that the contract that I'm trying to interact with also blocks contracts.