Hello,
Currently Iโm trying to migrate an application to Moralis, but on our team use case we need to modify the tx raw data after constructing it, similar to how you can do it with ethers before sending it.
Iโve tried the following methods with useWeb3Contract and useWeb3ExecutionFunction
const contractProcessor = useWeb3ExecuteFunction();
const options = {
abi: contractAbi,
contractAddress: contractAddress,
functionName: "lend",
params: {
sig: "0x69a743df8888853f109620cf920686ba791585d2ae5f1464fcaa2c064b257e712c90abd375b691129a229b01fad13253d2a2cbc19cc5f65a30a26feec681b3891b",
expiry: "1647612480",
token: "0x25af0cca791baee922d9fa0744880ae6e0422021",
amount: 1,
},
};
const {
runContractFunction: executeLendFunction,
data: executeLendTxResponse,
isLoading,
isFetching,
} = useWeb3Contract(options);
async function lend() {
// await contractProcessor.fetch({ params: options });
contractProcessor.setData({ params: options });
console.log(executeLendFunction);
console.log(contractProcessor.fetch.prototype);
console.log(contractProcessor.data);
console.log(executeLendFunction.arguments);
}
I assumed that one of those console.logs was the raw tx data, but didnโt got lucky with it;
Any suggestions?