Created
April 2, 2021 11:02
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cpy392_1) oberstet@intel-nuci7:~/scm/crossbario/xbr-protocol$ tox -e truffle-test | |
truffle-test run-test-pre: PYTHONHASHSEED='85756440' | |
truffle-test run-test: commands[0] | npm install --only=dev | |
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): | |
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) | |
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: google-closure-compiler-osx@20210106.0.0 (node_modules/google-closure-compiler-osx): | |
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for google-closure-compiler-osx@20210106.0.0: wanted {"os":"darwin","arch":"x64,x86"} (current: {"os":"linux","arch":"x64"}) | |
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: google-closure-compiler-windows@20210106.0.0 (node_modules/google-closure-compiler-windows): | |
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for google-closure-compiler-windows@20210106.0.0: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"}) | |
audited 1515 packages in 10.227s | |
81 packages are looking for funding | |
run `npm fund` for details | |
found 4313 vulnerabilities (12 low, 4255 moderate, 45 high, 1 critical) | |
run `npm audit fix` to fix them, or `npm audit` for details | |
truffle-test run-test: commands[1] | /home/oberstet/scm/crossbario/xbr-protocol/node_modules/.bin/truffle test --network ganache | |
Using network 'ganache'. | |
Compiling your contracts... | |
=========================== | |
> Everything is up to date, there is nothing to compile. | |
Deploying contracts from 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 with gas 9950000 .. | |
>>>> XBRTypes deployed at 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 | |
>>>> XBRToken deployed at 0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B | |
>>>> XBRNetwork deployed at 0xC89Ce4735882C9F0f0FE26686c53074E09B0D550 | |
>>>> XBRDomain deployed at 0xD833215cBcc3f914bD1C9ece3EE7BF8B14f841bb | |
>>>> XBRCatalog deployed at 0x9561C133DD8580860B6b7E504bC5Aa500f0f06a7 | |
>>>> XBRMarket deployed at 0xe982E462b094850F12AF94d21D470e21bE9D0E9C | |
>>>> XBRChannel deployed at 0x59d3631c86BbE35EF041872d502F218A39FBa150 | |
Deployed XBR contract addresses: | |
export XBR_DEBUG_TOKEN_ADDR=0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B | |
export XBR_DEBUG_NETWORK_ADDR=0xC89Ce4735882C9F0f0FE26686c53074E09B0D550 | |
export XBR_DEBUG_DOMAIN_ADDR=0xD833215cBcc3f914bD1C9ece3EE7BF8B14f841bb | |
export XBR_DEBUG_CATALOG_ADDR=0x9561C133DD8580860B6b7E504bC5Aa500f0f06a7 | |
export XBR_DEBUG_MARKET_ADDR=0xe982E462b094850F12AF94d21D470e21bE9D0E9C | |
export XBR_DEBUG_CHANNEL_ADDR=0x59d3631c86BbE35EF041872d502F218A39FBa150 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
Contract: XBRToken | |
✓ XBRToken() : should have produced the right initial supply of XBRToken | |
✓ XBRToken() : should initially put all XBRToken in the first account | |
✓ XBRToken.transfer() should correctly update token balances (237ms) | |
✓ XBRToken.approve()+transferFrom() should correctly update token balances (174ms) | |
✓ XBRToken.approveFor() should fail for invalid signature (158ms) | |
✓ XBRToken.approveFor()+transferFrom() should correctly update token balances (178ms) | |
✓ XBRToken.approveFor()+burnSignature() should correctly render the signature unusable (309ms) | |
Contract: XBRNetwork | |
✓ XBRNetwork() : token should be the network token | |
✓ XBRNetwork() : owner account should be initially registered | |
✓ XBRNetwork() : non-owner accounts should be initially unregistered (106ms) | |
✓ XBRNetwork.registerMember() : registering a member with wrong EULA should throw (52ms) | |
✓ XBRNetwork.registerMember() : should create new member with the correct attributes stored, and firing correct event (142ms) | |
✓ XBRNetwork.registerMember() : registering a member twice should throw (72ms) | |
✓ XBRNetwork.registerMemberFor() : delegated transaction should create new member with the correct attributes stored, and firing correct event (158ms) | |
Contract: XBRNetwork | |
✓ XBRMarket.createMarket() : should create new market (non-free with security) (331ms) | |
✓ XBRMarket.joinMarket() : provider should join existing market (280ms) | |
✓ XBRMarket.joinMarket() : consumer should join existing market (290ms) | |
✓ XBRMarket.joinMarket() : provider should also join as consumer in market (445ms) | |
✓ XBRMarket.joinMarket() : consumer should also join as provider in market (426ms) | |
✓ XBRMarket.joinMarket() : provider+consumer should join existing market (363ms) | |
✓ XBRMarket.joinMarketFor() : provider should join existing market (390ms) | |
✓ XBRMarket.createMarket() : should create new market (free without security) (373ms) | |
✓ XBRMarket.joinMarket() : provider+consumer should join existing free market (125ms) | |
✓ XBRMarket.leaveMarket() : provider+consumer should leave free market (immediately) (131ms) | |
Contract: XBRNetwork | |
================================================================================= | |
Market 0x9f80cc2aeb85c799e6c468af409dd6eb created - market operator fee rate is 42% | |
--------------------------------------------------------------------------------- | |
totalSupply : 1000000000 XBR) | |
marketFee : 420000000 XBR) | |
================================================================================= | |
================================================================================= | |
PAYMENT (Buyer) Channel OPEN | |
--------------------------------------------------------------------------------- | |
Channel opened with: | |
Channel deposit : 123 XBR | |
--------------------------------------------------------------------------------- | |
Balances BEFORE channel open: | |
Channel (contract) : 0 XBR | |
Buyer actor : 123 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 0 XBR | |
Market owner : 0 XBR | |
Network organization : 999999877 XBR | |
--------------------------------------------------------------------------------- | |
Balances AFTER channel open: | |
Channel (contract) : 123 XBR | |
Buyer actor : 0 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 0 XBR | |
Market owner : 0 XBR | |
Network organization : 999999877 XBR | |
--------------------------------------------------------------------------------- | |
Balance change: | |
Channel (contract) : 123 XBR | |
Buyer actor : -123 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 0 XBR | |
Market owner : 0 XBR | |
Network organization : 0 XBR | |
================================================================================= | |
✓ XBRChannel.openChannel(ctype==PAYMENT) : consumer should open payment channel (662ms) | |
================================================================================= | |
PAYING (Seller) Channel OPEN | |
--------------------------------------------------------------------------------- | |
Channel opened with: | |
Channel initial : 99 XBR | |
--------------------------------------------------------------------------------- | |
Balances BEFORE channel open: | |
Channel (contract) : 123 XBR | |
Seller actor : 0 XBR | |
Seller delegate : 0 XBR | |
Market maker : 99 XBR | |
Market owner : 0 XBR | |
Network organization : 999999778 XBR | |
--------------------------------------------------------------------------------- | |
Balances AFTER channel open: | |
Channel (contract) : 222 XBR | |
Seller actor : 0 XBR | |
Seller delegate : 0 XBR | |
Market maker : 0 XBR | |
Market owner : 0 XBR | |
Network organization : 999999778 XBR | |
--------------------------------------------------------------------------------- | |
Balance change: | |
Channel (contract) : 99 XBR | |
Seller actor : 0 XBR | |
Seller delegate : 0 XBR | |
Market maker : -99 XBR | |
Market owner : 0 XBR | |
Network organization : 0 XBR | |
================================================================================= | |
✓ XBRChannel.openChannel(ctype==PAYING) : provider should open paying channel (596ms) | |
================================================================================= | |
PAYMENT (Buyer) Channel (co-operative) CLOSE | |
--------------------------------------------------------------------------------- | |
Channel closing with: | |
Channel deposit : 123 XBR | |
Channel refund : 55 XBR | |
Channel spent : 68 XBR | |
Channel payout : 39.44 XBR | |
Channel fee : 28.56 XBR | |
Channel market : 19.992 XBR | |
Channel network : 8.568 XBR | |
--------------------------------------------------------------------------------- | |
Balances BEFORE channel close: | |
Channel (contract) : 222 XBR | |
Buyer actor : 0 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 0 XBR | |
Market owner : 0 XBR | |
Network organization : 999999778 XBR | |
--------------------------------------------------------------------------------- | |
Balances AFTER channel close: | |
Channel (contract) : 99 XBR | |
Buyer actor : 55 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 39.44 XBR | |
Market owner : 19.992 XBR | |
Network organization : 999999786.568 XBR | |
--------------------------------------------------------------------------------- | |
Balance change: | |
Channel (contract) : -123 XBR | |
Buyer actor : 55 XBR | |
Buyer delegate : 0 XBR | |
Market maker : 39.44 XBR | |
Market owner : 19.992 XBR | |
Network organization : 8.568 XBR | |
================================================================================= | |
✓ XBRChannel.closeChannel(ctype==PAYMENT) : consumer should close payment channel (751ms) | |
================================================================================= | |
PAYING (Seller) Channel (co-operative) CLOSE | |
--------------------------------------------------------------------------------- | |
Channel closing with: | |
Channel initial : 99 XBR | |
Channel refund : 37 XBR | |
Channel spent : 62 XBR | |
Channel payout : 35.96 XBR | |
Channel fee : 26.04 XBR | |
Channel market : 18.228 XBR | |
Channel network : 7.812 XBR | |
--------------------------------------------------------------------------------- | |
Balances BEFORE channel close: | |
Channel (contract) : 99 XBR | |
Seller actor : 0 XBR | |
Seller delegate : 0 XBR | |
Market maker : 39.44 XBR | |
Market owner : 19.992 XBR | |
Network organization : 999999786.568 XBR | |
--------------------------------------------------------------------------------- | |
Balances AFTER channel close: | |
Channel (contract) : 0 XBR | |
Seller actor : 35.96 XBR | |
Seller delegate : 0 XBR | |
Market maker : 76.44 XBR | |
Market owner : 38.22 XBR | |
Network organization : 999999794.38 XBR | |
--------------------------------------------------------------------------------- | |
Balance change: | |
Channel (contract) : -99 XBR | |
Seller actor : 35.96 XBR | |
Seller delegate : 0 XBR | |
Market maker : 37 XBR | |
Market owner : 18.228 XBR | |
Network organization : 7.812 XBR | |
================================================================================= | |
✓ XBRChannel.closeChannel(ctype==PAYING) : market maker should close paying channel (687ms) | |
Contract: XBRNetwork | |
✓ XBRMarket.createDomain() : should create new domain (185ms) | |
✓ XBRMarket.createDomainFor() : should create new domain (226ms) | |
✓ XBRMarket.pairNode() : should pair new node (248ms) | |
✓ XBRMarket.pairNodeFor() : should pair new node (167ms) | |
Contract: XBRTest | |
✓ XBRTest.test() : internal contract test function should succeed (41ms) | |
✓ XBRTest.test_verify1() : signature verification function should succeed (41ms) | |
✓ XBRTest.test_verify2() : signature verification function should succeed | |
✓ JS : should compute and recover a correct signature | |
✓ XBRTest.test_verify1 + JS : should compute and verify a correct signature | |
✓ XBRTest.test_verify1: should fail an invalid signature | |
38 passing (27s) | |
_______________________________________________________________ summary ________________________________________________________________ | |
truffle-test: commands succeeded | |
congratulations :) | |
(cpy392_1) oberstet@intel-nuci7:~/scm/crossbario/xbr-protocol$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment