title: How to pas params as bytes on solidity
body: <p>I have two functions on contract:</p>
  <p>function 1 receives <code>bytes params</code> variable</p>
  <p><code>function foo1(bytes memory params)</code></p>
  <p>function 2 receives two params: <code>address param1, uint256 param2</code></p>
  <p><code>function foo2(address param1, uint256 param2)</code></p>
  <p>my goals somehow pass params as bytes to <code>foo1</code>, decode it on function, and pass decoded params to <code>foo2</code></p>
  <p>like:</p>
  <pre><code>function foo2(address param1, uint256 param2) {
     // do something
  }
  
  function decode(bytes params) private returns(???){
    // decode
  }
  
  function foo1(bytes params) public {
    var decodedParams = fromBytes(params)
    foo2(decodedParams.param1, decodedParams.param2)
  }
  </code></pre>
  <p>from frontend I expect something like:</p>
  <pre><code>  const params = toBytes({param1: '0xAddRess', param2: 1})
  
    myContract.foo1(params)
  </code></pre>