Details
Hello everyone!
I am very new to openzeppelin so please bear with me if i you find my question silly.
I have created a Relayer on BSC testnet. Now i want to call a specfic function of my smart contract with "Send Transaction" of relayer. I have deployed my smart Contract on BSC test and also i have ABI code.
The function of my contract which i want to call, require two arguments (See that function below). How to pass all information and call function with Simple JavaScript HTTP(if possible). Or suggest me a best way to do it.
Instead of ERC20_ADDRESS, use the address of that contract and instead of ERC20_ABI use your ABI and then instead of calling erc20.transfer, you'd want to call something like someContract.declareWinner(roomId, winner) (assuming someContract is the variable that your contract is assigned to - this is erc20 in the example). And you'd need to pass the desired arguments in for roomId and winner.
Please let us know if you have any other questions!
Following up on this. Do you have a solution for Python? Your code example for the txs endpoint does not show any way to specify the function name or its parameters. For example, using web3.py, I would want to do something like:
FYI ... I ended up writing a Node server that uses ethers to do this (very small number of lines of code!). And then I call that from my Python server. Works great in the absence of a Python DefenderRelayer provider.