How to set the parameters of TransparentUpgradeableProxy idata

First of all, thank you for your support.
Is the first time I use TransparentUpgradeableProxy. There are three parameters involved in this.

  1. Address logic (This is the contract address of the business)
  2. Address admin (I understand)
  3. Bytes Memory Data

I’m not sure how to configure the data parameter.

** :computer: Environment **
IDE: Remix
OS: MacBook
OS Version: 10.15.7
Code File: @openzeppelin/contracts/proxy/Proxy.sol
Chain: Bsc

** :memo: Details **
I understand the composition of setting a function and args in data. The problems I want to solve are as follows:

  1. Address logic (this is the business contract address), this parameter understand correct?
  2. Bytes Memory Data
    2.1 If there are multiple methods and parameters, how to configure them?
    2.2 Is there a tool that can quickly calculate this parameter?
  3. How can I verify that what I post is correct? I use Remix. I can only access the interface of Proxy.

** :1234: Code to reproduce **

contract TransparentUpgradeableProxy is UpgradeableProxy {
/ * *
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
* optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.
* /
constructor(address _logic, address _admin, bytes memory _data) public payable UpgradeableProxy(_logic, _data) {
assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));

Hi, welcome! :wave:

yeah, address logic is equal to the implementation in the contract.

I think you can use web3.js to do this: (you also can do this with ethers.js)

Maybe you can have a look at this topic, and you can also use this plugin to verify: hardhat-etherscan

BTW, for more details about proxy, you can have a look at these articles:

And now, OpenZeppelin would like to use UUPS Proxies OpenZeppelin Contracts 4.1 – OpenZeppelin blog