I'm writing a proxy contract in Solidity. To forward incoming calls in my fallback function I'm using inline assembly code. I'm a student and the code below is the code my instructor wrote in the tutorial.
I'm receiving the following error with my code though:
Builtin function "gas" must be called.
I'm assuming that Solidity has evolved since the making of the tutorial, but I cannot find anything online (google or the docs).
Here is the code:
assembly {
let result := delegatecall(gas, implementation, add(data, 0x20), mload(data), 0, 0)
let size := returndatasize
let ptr := mload(0x40)
returndatacopy(ptr, 0, size)
switch result
case 0 {revert(ptr, size)}
default{return(ptr, size)}
}
The error refers to the word "gas" in line 2 which is underlined in red.
Has something changed?