-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathToken.m
33 lines (29 loc) · 844 Bytes
/
Token.m
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
classdef Token
%TOKEN class modelling a token
properties
Name string
IsStablecoin logical = false
IsCollateral logical = false
PEG double = 1
end
methods
function token = Token(varargin)
%Token() Construct an instance of this class
token.Name = varargin{1};
if nargin > 1
token.IsStablecoin = varargin{2};
if nargin > 2
token.IsCollateral = varargin{3};
token.PEG = varargin{4};
end
end
end
function is_eq = is_equal(self, other)
if self.Name == other.Name
is_eq = true;
else
is_eq = false;
end
end
end
end