LSDVault - Dependencies

Context.sol

This is a Solidity contract named 'Context' that provides information about the current execution context, including the transaction sender and its data. This contract is especially useful when dealing with GSN meta-transactions where the account sending and paying for execution may not be the actual sender. The contract contains two internal view functions '_msgSender' and '_msgData' that return the sender's address and the transaction's data respectively.

A Solidity contract that provides information about the current execution context, including the transaction sender and its data.

_msgSender() internal view virtual returns (address payable) Returns the address of the sender of the transaction.

  • address payable: The address of the sender of the transaction.

_msgData() internal view virtual returns (bytes memory) Returns the data of the transaction.

  • bytes memory: The data of the transaction.

An example of how to use Context contract to get the sender's address and transaction's data.

// SPDX-License-Identifier: MIT
pragma solidity >=0.6.11;
import './Context.sol';
contract Example is Context {
    function getSenderAddress() public view returns (address payable) {
        return _msgSender();
    }
    function getTransactionData() public view returns (bytes memory) {
        return _msgData();
    }
}
Previous
Address.sol