public function encodeMulticall($data) {

        $packed_requests = array();

        foreach ( $data as $methodName => $params ) {

            if ( is_int($methodName) && count($params) == 2 ) {

                array_push($packed_requests, array(
                    "methodName"    =>  $params[0],
                    "params"        =>  $params[1]
                ));    

            } else {

                array_push($packed_requests, array(
                    "methodName"    =>  $methodName,
                    "params"        =>  $params
                ));

            }

        }

        return $this->encodeCall("system.multicall", array($packed_requests));

    }