Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
caelum-tech
TTT
caelum-identity
Commits
a4449b36
Commit
a4449b36
authored
Jun 07, 2019
by
Chuck LeDuc Díaz
Browse files
linty fresh
parent
fa8a090e
Pipeline
#65190925
passed with stage
in 2 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test/Identity.js
test/Identity.js
+6
-6
No files found.
test/Identity.js
View file @
a4449b36
...
...
@@ -46,8 +46,8 @@ describe('1.1. Identity', function () {
it
(
'
Should work as expected : setData and getData
'
,
(
done
)
=>
{
identityContract
.
setData
(
key
,
value
)
.
then
(
async
(
tx
)
=>
{
tx2
=
await
tx
.
wait
()
console
.
log
(
"
setData manual after waiting:
"
,
tx2
)
const
tx2
=
await
tx
.
wait
()
console
.
log
(
'
setData manual after waiting:
'
,
tx2
)
return
identityContract
.
getData
(
key
)
})
.
then
((
resValue
)
=>
{
...
...
@@ -66,20 +66,20 @@ describe('1.1. Identity', function () {
expect
(
owner
).
to
.
be
.
equal
(
wallet
.
address
)
let
iface
=
new
ethers
.
utils
.
Interface
(
IdentityContract
.
abi
)
//let encodedCall = iface.functions.setData.encode([ key, value ], 0, { from: wallet.address })
//
let encodedCall = iface.functions.setData.encode([ key, value ], 0, { from: wallet.address })
let
encodedCall
=
iface
.
functions
.
setData
.
encode
([
key
,
value
])
//console.log("Encoded call: ", encodedCall)
//
console.log("Encoded call: ", encodedCall)
let
tx
=
await
identityContract
.
execute
(
OPERATION_CALL
,
newId
.
address
,
0
,
encodedCall
)
tx
=
await
tx
.
wait
()
console
.
log
(
"
tx execute after waiting:
"
,
tx
)
console
.
log
(
'
tx execute after waiting:
'
,
tx
)
return
newId
})
.
then
(
async
(
newId
)
=>
{
console
.
log
(
'
** GetData 1
'
)
let
data1
=
await
identityContract
.
getData
(
key
)
console
.
log
(
data1
)
let
data2
=
await
newId
.
getData
(
key
)
let
data2
=
await
newId
.
getData
(
key
)
console
.
log
(
'
** GetData 2
'
)
console
.
log
(
data2
)
done
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment