forked from svanas/delphereum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb3.eth.contract.pas
59 lines (47 loc) · 1.59 KB
/
web3.eth.contract.pas
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{******************************************************************************}
{ }
{ Delphereum }
{ }
{ Copyright(c) 2019 Stefan van As <[email protected]> }
{ Github Repository <https://github.com/svanas/delphereum> }
{ }
{ Distributed under Creative Commons NonCommercial (aka CC BY-NC) license. }
{ }
{******************************************************************************}
unit web3.eth.contract;
{$I web3.inc}
interface
uses
// web3
web3;
type
ICustomContract = interface
function Client : TWeb3;
function Contract: TAddress;
end;
TCustomContract = class abstract(TInterfacedObject, ICustomContract)
strict private
FClient : TWeb3;
FContract: TAddress;
public
constructor Create(aClient: TWeb3; aContract: TAddress); virtual;
function Client : TWeb3;
function Contract: TAddress;
end;
implementation
{ TCustomContract }
constructor TCustomContract.Create(aClient: TWeb3; aContract: TAddress);
begin
inherited Create;
FClient := aClient;
FContract := aContract;
end;
function TCustomContract.Client: TWeb3;
begin
Result := FClient;
end;
function TCustomContract.Contract: TAddress;
begin
Result := FContract;
end;
end.