Solidity Function Calls Sample Clauses

Solidity Function Calls. ‌ Nested function calls in Solidity are the reason behind several identified vulner- abilities. We briefly describe how a smart contract can call a function of another contract or delegate execution. More information can be found in the Solid- ity documentation [46]. Firstly, a contract can call functions defined in another contract: – addressOfContract .call(data): Low-level call, for which the name and ar- guments of the invoked function must be specified in data according to the Ethereum ABI. The call method returns Boolean true if the execution was successful (or if there is no contract at the specified address) and false if it failed (e.g., if the invoked function threw an exception). – contract .function(arg1 , arg2 , ...): High-level call10, which may return a value as output on success. If the invoked method fails (or does not exist), an exception is raised in the caller, which means that all changes made by the caller are reverted, and the exception is automatically propagated up in the call hierarchy. If the function specified for call does not exist, then the fallback function of the callee is invoked. The fallback function does not have a name11 and argu- ments, and it cannot return anything. A contract can have at most one fallback function, and no function is executed if a fallback is not found (note that this does not constitute a failure). The fallback function is also invoked if ether12 is sent to the contract using one of the two methods: – addressOfContract .send(amount ): Sends the specified amount of currency to the contract, invoking its fallback function (if there exists one). If send fails (e.g., if the fallback function throws an exception), then it returns Boolean false; otherwise, it returns true. – addressOfContract .transfer(amount ): Similar to send, but raises an ex- ception on failure, which is handled similar to a high-level function call fail- ure. Finally, a contract can also “delegate” execution to another contract using ad- dressOfContract .delegatecall(data). Delegation is similar to a low-level call, but there is a fundamental difference: in this case, the function specified by data is executed in the context of the caller (e.g., the function will see the contract variables of the caller, not the callee). In other words, contracts may “borrow code” from other contracts using delegatecall, which enables the creation of libraries.

Related to Solidity Function Calls

  • Commercially Useful Function A prime consultant can credit expenditures to a DBE subconsultant toward DBE goals only if the DBE performs a Commercially Useful Function (CUF). A DBE performs a CUF when it is responsible for execution of the work of a contract and carries out its responsibilities by actually performing, managing, and supervising the work involved. To perform a commercially useful function, the DBE must also be responsible, with respect to materials and supplies on the contract, for negotiating price, determining quality and quantity, ordering the material, and installing (where applicable) and paying for the material itself that it uses on the project. To determine whether a DBE is performing a commercially useful function, the Department will evaluate the amount of work subcontracted, industry practices, whether the amount the firm is to be paid under the contract is commensurate with the work it is actually performing and the DBE credit claimed for its performance of the work, and other relevant factors. A DBE will not be considered to perform a commercially useful function if its role is limited to that of an extra participant in a transaction, contract, or project through which funds are passed in order to obtain the appearance of DBE participation. In determining whether a DBE is such an extra participant, the Department will examine similar transactions, particularly those in which DBEs do not participate. If a DBE does not perform or exercise responsibility for at least 30 percent of the total cost of its contract with its own work force, or if the DBE subcontracts a greater portion of the work of a contract than would be expected on the basis of normal industry practice for the type of work involved, the Department will presume that the DBE is not performing a commercially useful function. When a DBE is presumed not to be performing a commercially useful function as provided above, the DBE may present evidence to rebut this presumption. The Department will determine if the firm is performing a CUF given the type of work involved and normal industry practices. The Department will notify the consultant, in writing, if it determines that the consultant’s DBE subconsultant is not performing a CUF. The consultant will be notified within seven calendar days of the Department’s decision. Decisions on CUF may be appealed to the ADOT State Engineer. The appeal must be in writing and personally delivered or sent by certified mail, return receipt requested, to the State Engineer. The appeal must be received by the State Engineer no later than seven calendar days after the decision of ▇▇▇▇. ▇▇▇▇’s decision remains in place unless and until the State Engineer reverses or modifies BECO’s decision. ADOT State Engineer will promptly consider any appeals under this subsection and notify the consultant of ADOT’s State Engineer findings and decisions. Decisions on CUF matters are not administratively appealable to USDOT. The BECO may conduct project site visits on the contract to confirm that DBEs are performing a CUF. The consultant shall cooperate during the site visits and the BECO’s staff will make every effort not to disrupt work on the project.

  • Performance of Government Functions Nothing contained in this contract shall be deemed or construed so as to in any way estop, limit, or impair the City from exercising or performing any regulatory, policing, legislative, governmental, or other powers or functions.

  • MANAGEMENT FUNCTIONS B.1 The Association recognizes that the management of the Hospital and the direction of working forces are fixed exclusively in the Hospital and shall remain solely with the Hospital except as specifically limited by the provisions of this Agreement and, without restricting the generality of the foregoing, the Association acknowledges that it is the exclusive function of the Hospital to: (a) maintain order, discipline and efficiency; (b) hire, assign, retire, discharge, direct, promote, demote, classify, transfer, lay- off, recall, and suspend or otherwise discipline nurses, provided that a claim of discharge or discipline without just cause may be the subject of a grievance and dealt with as hereinafter provided; (c) determine, in the interest of efficient operation and high standards of service, job rating and classification, the hours of work, work assignments, methods of doing the work, and the working establishment for the service; (d) generally to manage the operation that the Hospital is engaged in and, without restricting the generality of the foregoing, to determine the number of personnel required, methods, procedures, and equipment in connection therewith; (e) make, enforce, and alter from time to time reasonable rules and regulations to be observed by the nurses which are not inconsistent with the provisions of this Agreement. B.2 These rights shall not be exercised in a manner inconsistent with the provisions of this Agreement.