-
Notifications
You must be signed in to change notification settings - Fork 0
/
Accounts2.sol
45 lines (29 loc) · 1.15 KB
/
Accounts2.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-License-Identifier: JAIRO LAMUS
pragma solidity ^0.7.5;
contract Accounts2 {
string public documentTitle;
string public documentURL;
address public documentOwner;
constructor(string memory title, string memory url) public {
documentTitle = title;
documentURL = url;
documentOwner = msg.sender;
}
function get_Direccion_Contrato() public view returns (address) {
return address(this);
//retorna la direccion del contrato, la cual se asigna al momento del deploy
}
function get_Direccion_DelInvocante() public view returns (address) {
return address(msg.sender);
//retorna la direccion del invocante
}
function get_Saldo_Contrato() public view returns (uint256) {
//return this.balance;
return address(this).balance;
//retorna el saldo de la direccion del contrato
}
function get_Saldo_DelInvocante() public view returns (uint256) {
return msg.sender.balance;
//retorna el saldo de la direccion del contrato
}
}