Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cauciones
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
blockchain
Cauciones
Commits
335ec71b
Commit
335ec71b
authored
6 years ago
by
Mariano Absatz (git)
Browse files
Options
Downloads
Patches
Plain Diff
utilizo la nomenclatura propuesta por la SSN
parent
b2a14fbc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SmartContract/cauciones.sol
+5
-5
5 additions, 5 deletions
SmartContract/cauciones.sol
with
5 additions
and
5 deletions
SmartContract/cauciones.sol
+
5
−
5
View file @
335ec71b
...
@@ -8,9 +8,9 @@ contract Majority {
...
@@ -8,9 +8,9 @@ contract Majority {
}
}
contract
cauciones
{
contract
cauciones
{
enum
EstadosDePolizas
{
PolizaNoExiste
,
PolizaVigente
,
PolizaCancela
do
,
PolizaAnulad
o
}
enum
EstadosDePolizas
{
PolizaNoExiste
,
PolizaVigente
,
RiesgoConclui
do
,
PolizaAnulad
a
}
//
why a struct? because I think we'll see requirements for more info
//
Usamos un struct porque pueden haber un futurorequerimiento para poner mas información
struct
poliza
{
struct
poliza
{
EstadosDePolizas
estado
;
EstadosDePolizas
estado
;
}
}
...
@@ -24,7 +24,7 @@ contract cauciones {
...
@@ -24,7 +24,7 @@ contract cauciones {
_
;
_
;
}
}
//
can't use the modifier before the admins variable has been initialized.
//
no se puede usar el modificador antes de inicializar la variable admins
constructor
(
address
admincontractaddress
)
constructor
(
address
admincontractaddress
)
public
public
{
{
...
@@ -53,14 +53,14 @@ contract cauciones {
...
@@ -53,14 +53,14 @@ contract cauciones {
{
{
// must exist already
// must exist already
require
(
polizas
[
objeto
].
estado
!=
EstadosDePolizas
.
PolizaNoExiste
);
require
(
polizas
[
objeto
].
estado
!=
EstadosDePolizas
.
PolizaNoExiste
);
_set_estado
(
objeto
,
EstadosDePolizas
.
PolizaAnulad
o
);
_set_estado
(
objeto
,
EstadosDePolizas
.
PolizaAnulad
a
);
}
}
function
cancelarPoliza
(
uint256
objeto
)
function
cancelarPoliza
(
uint256
objeto
)
public
onlyAuthorized
public
onlyAuthorized
{
{
// must exist already
// must exist already
require
(
polizas
[
objeto
].
estado
!=
EstadosDePolizas
.
PolizaNoExiste
);
require
(
polizas
[
objeto
].
estado
!=
EstadosDePolizas
.
PolizaNoExiste
);
_set_estado
(
objeto
,
EstadosDePolizas
.
PolizaCancela
do
);
_set_estado
(
objeto
,
EstadosDePolizas
.
RiesgoConclui
do
);
}
}
function
mostrarEstado
(
uint256
objeto
)
function
mostrarEstado
(
uint256
objeto
)
public
view
public
view
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment