UNPKG

@0xcert/ethereum-gateway-contracts

Version:

Smart contracts used by the gateway on the Ethereum blockchain.

154 lines (138 loc) 8.34 kB
>>> @0xcert/ethereum-gateway-contracts Found mismatch: "packages/0xcert-ethereum-gateway-contracts/CHANGELOG.json": "0c0189d7a282ee2bb3f444bafb27b3c4658f302e" !== "2910f9eafd6c942e7c494d3a51384c82c5f3b2e8" npm run lint && npm run clean && npx specron compile && npx specron test > @0xcert/ethereum-gateway-contracts@2.1.1 lint /Users/xpepermint/Work/0xcert/repositories/framework/packages/0xcert-ethereum-gateway-contracts > npm run tslint && npm run solhint > @0xcert/ethereum-gateway-contracts@2.1.1 tslint /Users/xpepermint/Work/0xcert/repositories/framework/packages/0xcert-ethereum-gateway-contracts > npx eslint 'src/**/*.ts?(x)' > @0xcert/ethereum-gateway-contracts@2.1.1 solhint /Users/xpepermint/Work/0xcert/repositories/framework/packages/0xcert-ethereum-gateway-contracts > npx solhint 'src/contracts/**/*.sol' > @0xcert/ethereum-gateway-contracts@2.1.1 clean /Users/xpepermint/Work/0xcert/repositories/framework/packages/0xcert-ethereum-gateway-contracts > rm -Rf ./build Contracts ./src/contracts/actions-gateway.sol ./src/contracts/token-deploy-gateway.sol ./src/contracts/xcert-deploy-gateway.sol 3 contracts src/tests/token-deploy-gateway/cancel-instance-method.test.ts cancels an deploy 1664ms fails when not the maker tries to cancel deploy 2371ms fails when trying to cancel an alredy performed deploy 1196ms src/tests/token-deploy-gateway/perform-any-taker-instance-method.test.ts performs a deploy 705ms fails when not enough balance 639ms fails with expired claim 928ms fails with invalid signature 958ms fails with invalid signature kind 759ms fails trying to perform an already performed deploy 902ms fails trying to perform a canceled deploy 636ms src/tests/token-deploy-gateway/perform-instance-method.test.ts performs a deploy 610ms fails when not enough balance 979ms fails when not specified taker 566ms fails with expired claim 566ms fails with invalid signature 646ms fails with invalid signature kind 595ms fails trying to perform an already performed deploy 1067ms fails trying to perform a canceled deploy 781ms src/tests/token-deploy-gateway/set-proxy-instance-method.test.ts Sets new deploy proxy Fails setting new deploy proxy without permission src/tests/xcert-deploy-gateway/cancel-instance-method.test.ts cancels an deploy 559ms fails when not the maker tries to cancel deploy fails when trying to cancel an alredy performed deploy 829ms src/tests/xcert-deploy-gateway/perform-any-taker-instance-method.test.ts performs a deploy 1075ms fails when not enough balance 736ms fails with expired claim 983ms fails with invalid signature 1422ms fails with invalid signature kind 756ms fails trying to perform an already performed deploy 1131ms fails trying to perform a canceled deploy 983ms src/tests/xcert-deploy-gateway/perform-instance-method.test.ts performs a deploy 2357ms fails when not enough balance 1628ms fails when not specified taker 1238ms fails with expired claim 1813ms fails with invalid signature 1208ms fails with invalid signature kind 2384ms fails trying to perform an already performed deploy 1814ms fails trying to perform a canceled deploy 874ms src/tests/xcert-deploy-gateway/set-proxy-instance-method.test.ts Sets new deploy proxy Fails setting new deploy proxy without permission src/tests/actions-gateway/burn-instance-method/burn-fail.test.ts throws when signer is not the owner 944ms throws when proxy does not have approval do destory an asset 824ms throws when proxy does not have ability to execute 672ms src/tests/actions-gateway/burn-instance-method/burn-perform.test.ts Destroys cat #1 with signature 504ms Destroys cat #1 with any taker 518ms Destroys cat #1 with any signer Destroys cat #1 with any destroyer 503ms Destroys cat #1 without signature src/tests/actions-gateway/create-instance-method/create-perform-fail.test.ts fails if a signature is missing fails when proxy does not have the create rights fails if maker does not have asset creating ability 686ms src/tests/actions-gateway/create-instance-method/create-perform.test.ts Create cat #1 with signature 1421ms Create cat #1 with any taker 1970ms Create cat #1 with any signer 1446ms Create cat #1 with any creator 1586ms Create cat #1 without signature 1384ms Create and transfer token in a single order 1196ms src/tests/actions-gateway/manage-abilitites-instance-method/manage-abilities-perform-fail.test.ts fails when proxy does not have the manage ability rights fails if maker does not have allow manage ability src/tests/actions-gateway/manage-abilitites-instance-method/manage-abilities-perform.test.ts Successfully sets ability no signature Successfully sets ability with signature 922ms Successfully sets ability with any taker 719ms Successfully sets ability with any signer 639ms Successfully removes own manage ability 516ms Successfully sets multiple abilities 1285ms src/tests/actions-gateway/misc/cancel.test.ts succeeds 821ms throws when trying to cancel an already performed atomic swap 1058ms throws when a third party tries to cancel an atomic swap 732ms src/tests/actions-gateway/misc/claims.test.ts check valid signature check invalid signature check signature from a third party account src/tests/actions-gateway/misc/fail.test.ts when current time is after expirationTimestamp when signature is invalid trying to perform an alredy pefromed swap src/tests/actions-gateway/misc/multi.test.ts sucesfully executes multiple actions scenario #1 3048ms sucesfully executes multiple actions scenario #2 2649ms sucesfully executes multiple actions scenario #3 2656ms sucesfully executes multiple actions scenario #4 2747ms src/tests/actions-gateway/misc/proxies.test.ts correctly adds proxy addresses correctly removes proxy address throws when a third party tries to add proxy address src/tests/actions-gateway/transfer-erc20-instance-method/transfer-erc20-fail.test.ts when proxy has unsofficient allowence for a token src/tests/actions-gateway/transfer-erc20-instance-method/transfer-erc20.test.ts transfer 3000 ZXC with signature 556ms transfer 3000 ZXC without signature 595ms transfer 3000 ZXC with any taker 608ms transfer 3000 ZXC with any signer 706ms src/tests/actions-gateway/transfer-erc721-instance-method/transfer-erc721-fail.test.ts when proxy not allowed to transfer nft src/tests/actions-gateway/transfer-erc721-instance-method/transfer-erc721.test.ts Transfer Cat #1 with signature Transfer Cat #1 without signature 565ms Transfer Cat #1 with any taker 585ms Transfer Cat #1 with any signer 686ms src/tests/actions-gateway/update-instance-method/update-fail.test.ts throws when signer does not have ability to sign an update asset 551ms throws when proxy does not have ability to update assets 923ms throws when proxy does not have ability to execute src/tests/actions-gateway/update-instance-method/update-perform.test.ts Updated cat #1 with signature Updated cat #1 without signature 542ms 96 passing