Skip to content

Commit

Permalink
Merge branch 'release/v1.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschuck committed Dec 14, 2018
2 parents c447f3f + 2763ee4 commit 3313974
Show file tree
Hide file tree
Showing 50 changed files with 3,586 additions and 7,943 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ node_modules/*
ipfs-contractus
package-lock.json
package-lock.json.*
yarn.lock
58 changes: 49 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,55 @@ language: node_js

sudo: required

node_js:
- "8.11.3"
matrix:
include:
- name: "non-blockchain specific tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0xC2ee94f6cf046B02D530cf1cd16A2b32b8A4340d":"EF7012DD4D5DD6A78765C511F452F8CA641378F0DF071F9C32D506F45F31B22C","0xac46D762f0aB316105C5Cf4375bb8e380Be88658":"E29C1E4A683CC629E39CE219CFB1F35BBA898605E1B197162F0EECF0F1139630","0x35f8220bC83577458aEa4a1085A8b832DEa79b7a":"340BA316637FD01A1AFD54D4491A899F6D8EA0FB89A1D7BA94682F7D68B21B20"}'
- TESTSPECS='src/encryption/*.spec.ts src/dfs/*.spec.ts'
script:
- npm run testunit $TESTSPECS

env:
- CXX=g++-4.8
- name: "services contracts tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0xC2ee94f6cf046B02D530cf1cd16A2b32b8A4340d":"EF7012DD4D5DD6A78765C511F452F8CA641378F0DF071F9C32D506F45F31B22C","0xac46D762f0aB316105C5Cf4375bb8e380Be88658":"E29C1E4A683CC629E39CE219CFB1F35BBA898605E1B197162F0EECF0F1139630","0x35f8220bC83577458aEa4a1085A8b832DEa79b7a":"340BA316637FD01A1AFD54D4491A899F6D8EA0FB89A1D7BA94682F7D68B21B20"}'
- TESTSPECS='src/claims/*.spec.ts src/profile/*.spec.ts src/*.spec.ts'
script:
- npm run testunit $TESTSPECS

- name: "data contract (encryption) tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0x0e10fa0aa2273F074F51a09F2eC95890816FD6d6":"4943D3A1D1457E627537D5C1DD6846B718807D11431283B659AED9F2988F3694","0xb0646ee7b728B72bc9F73D0f9DDAf00D1a981fa0":"D9734AFE9168C37481A977C91FE25B9C7D814789F515D78DC084A27BD2137E14","0x04B1Ee1b9D5283B2694B739DA5b49DBC88199750":"68475374AC69364D64F94A47D66410936F63971FE5EEAEFDF85913D153799EE5"}'
- TESTSPECS="src/contracts/data-contract/*.spec.ts"
script:
- npm run testunit $TESTSPECS -- --grep 'when working encrypted DFS files'

- name: "data contract tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0x13c9c6ECFA485A74a0A8773856c21a215CbE571A":"ece5780d73ce564f641224c68a12c313bf5cfe0bc5b3ab116be1a573280d1a2a","0x5F67b2134B89Cad2FDAFe6C72D8BEDeF4072cb6b":"b7847096f0bf10996ea70feae73211b7236e9a2317943400fecf8807cd542563","0x2B144A2C8055535A48582c1d0bA11A2Ff10769b2":"ce03f7cd8992ba36687de0d942870286128d379a6fc08aab96dbbde7268e6871"}'
- TESTSPECS="src/contracts/data-contract/*.spec.ts"
script:
- npm run testunit $TESTSPECS -- --grep 'when working encrypted DFS files' --invert

- name: "service/base/businesscenter contract tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0x001De828935e8c7e4cb56Fe610495cAe63fb2612":"01734663843202e2245e5796cb120510506343c67915eb4f9348ac0d8c2cf22a","0x0030C5e7394585400B1FB193DdbCb45a37Ab916E":"7d09c0873e3f8dc0c7282bb7c2ba76bfd432bff53c38ace06193d1e4faa977e7","0x00D1267B27C3A80080f9E1B6Ba01DE313b53Ab58":"a76a2b068fb715830d042ca40b1a4dab8d088b217d11af91d15b972a7afaf202"}'
- TESTSPECS='src/contracts/*.spec.ts !src/contracts/name-resolver.spec.ts src/contracts/base-contract/*.spec.ts src/contracts/business-center/*.spec.ts src/contracts/service-contract/*.spec.ts'
script:
- npm run testunit $TESTSPECS

- name: "nameresolver contract tests"
node_js: "8.11.3"
env:
- ACCOUNT_MAP='{"0x3Be2E8D1A93139A981dc0dFe5E21B53fD6768FA6":"f42d8b97d89636b9c49d765e471f89b465df1bbb59ced554387ba4c38789fe31","0xfe825e67A8F8a0fB31496280173a3de4a6ddEc43":"5e0dbef7deafe54becbcac51f970307fe1679797cbe40f18f5dc55c9740b8d4d","0x4e61A980F2081fCAc3E1777d667B66DF0516d264":"44367a662acc6267065ce64b83a88949f5adc0249ba1cbf55309877117c2e954"}'
- TESTSPECS='src/contracts/name-resolver.spec.ts'
script:
- npm run testunit $TESTSPECS
addons:
apt:
sources:
Expand All @@ -19,11 +62,8 @@ addons:
before_install:
- export CXX="g++-4.8"
- npm install -g npm@latest
- npm install -g ganache-cli truffle

install:
- npm install

script:
- ganache-cli -f https://testcore.evan.network -l 0x3938700 -q &
- npm run test
- cd node_modules/@evan.network && rm -rf dbcp && git clone https://github.com/evannetwork/dbcp.git && cd dbcp && git checkout develop && npm i && npm run build && cd ../../../
- cd node_modules/@evan.network && rm -rf smart-contracts-core && git clone https://github.com/evannetwork/smart-contracts-core.git && cd smart-contracts-core && git checkout develop && npm i && cd ../../../
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# blockchain-core

[![Build Status](https://travis-ci.org/evannetwork/api-blockchain-core.svg?branch=develop)](https://travis-ci.org/evannetwork/api-blockchain-core)

## Table of Contents
<!-- MarkdownTOC autolink="true" -->

Expand Down
10 changes: 10 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
### Fixes
### Deprecations

## Version 1.6.0
### Features
- add own ipfs handler
- add ipfs identification header to enable future ipfs payments
- add `defaultClaims` to `Profile` `loadActiveClaims`
- add `Votings` helper for holding votes on-chain
- add support for `PayableRegistrar`, that allows to by domain names with EVEs
- add support for ENS registries with time limited nodes
- add support for permanent ENS address on payable registrar
- add support for retrieving proposals paged

## Version 1.5.0
### Features
Expand Down
1 change: 1 addition & 0 deletions docs/blockchain/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Blockchain
name-resolver
description
wallet
votings

This section contains modules, that deal with basic blockchain interactions, like

Expand Down
252 changes: 246 additions & 6 deletions docs/blockchain/name-resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,9 @@ claimAddress

.. code-block:: typescript
nameResolver.claimAddress(name, accountId[, domainOwnerId]);
nameResolver.claimAddress(name, accountId[, domainOwnerId, price]);
Tries to claim node ownership from parent nodes owner, this assumes, that the parent node owner is a
FIFS registar.
Tries to claim node ownership from parent nodes owner, this assumes, that the parent node owner is a registar, that supports claiming address from it (FIFS registrar or PayableRegistrar).

----------
Parameters
Expand All @@ -325,6 +324,7 @@ Parameters
#. ``name`` - ``string``: domain name to set (plain text)
#. ``accountId`` - ``string``: account, that executes the transaction
#. ``domainOwnerId`` - ``string`` (optional): owner of the new domain, defaults to ``accountId``
#. ``value`` - ``string|number`` (optional): value to send (if registrar is payable)

-------
Returns
Expand All @@ -338,9 +338,248 @@ Example

.. code-block:: typescript
// claim '123test.fifs.registrar.test.evan' with account[0] for account[1]
await nameResolver.claimAddress(
'123test.fifs.registrar.test.evan', accounts[0], accounts[1]);
// claim '123test.fifs.registrar.test.evan' with account[0] for account[1] from FIFS registrar
const domain = '123test.fifs.registrar.test.evan';
await nameResolver.claimAddress(domain, accounts[0], accounts[1]);
// claim '123test.payable.registrar.test.evan' with account[0] for account[1] from payable registrar
const domain = '123test.fifs.registrar.test.evan';
const price = await nameResolver.getPrice(domain);
await nameResolver.claimAddress(domain, accounts[0], accounts[1], price);
--------------------------------------------------------------------------------

.. _name_resolver_claimPermanentAddress:

claimPermanentAddress
================================================================================

.. code-block:: typescript
nameResolver.claimPermanentAddress(name, accountId[, domainOwnerId]);
Registers a permanent domain via registrar, can only be done by registrar owner.

----------
Parameters
----------

#. ``name`` - ``string``: domain name to set (plain text)
#. ``accountId`` - ``string``: account, that executes the transaction, has to be registrar owner
#. ``domainOwnerId`` - ``string`` (optional): owner of the new domain, defaults to ``accountId``

-------
Returns
-------

``Promise`` returns ``void``: resolved when done

-------
Example
-------

.. code-block:: typescript
// claim '123sample.evan' with account[0] for account[1] from registrar
const domain = '123sample.evan';
await nameResolver.claimPermanentAddress(domain, accounts[0], accounts[1]);
--------------------------------------------------------------------------------

.. _name_resolver_setPrice:

setPrice
================================================================================

.. code-block:: typescript
nameResolver.setPrice(name, accountId, newPrice);
Set price for a registrar at a domain.

----------
Parameters
----------

#. ``name`` - ``string``: ENS address of a domain owned by a registrar (e.g. 'sample.payable.test.evan')
#. ``accountId`` - ``string``: account that performs the action (needs proper permisions for registrar)
#. ``newPrice`` - ``number|string`` (optional): new price in Wei

-------
Returns
-------

``Promise`` returns ``void``: resolved when done

-------
Example
-------

.. code-block:: typescript
await nameResolver.setPrice(
'payable.registrar.test.evan',
'0x1111111111111111111111111111111111111111',
web3.utils.toWei('5', 'ether'),
);
--------------------------------------------------------------------------------

.. _name_resolver_getPrice:

getPrice
================================================================================

.. code-block:: typescript
nameResolver.getPrice(name);
Get price for domain (if domain is payable).

----------
Parameters
----------

#. ``name`` - ``string``: a domain to check price for (e.g. 'sample.payable.test.evan')

-------
Returns
-------

``Promise`` returns ``string``: price in Wei

-------
Example
-------

.. code-block:: typescript
console.log(await nameResolver.getPrice('payable.registrar.test.evan'));
// Output:
// 5000000000000000000
--------------------------------------------------------------------------------

.. _name_resolver_setValidUntil:

setPrice
================================================================================

.. code-block:: typescript
nameResolver.setValidUntil(name, accountId, newPrice);
Set duration, that an address is valid; resolval stops after this, depending on configuration of the ENS an extra period, where owner is still available, can be granted; notice that this can only be done by parent owner of given domain.

----------
Parameters
----------

#. ``name`` - ``string``: ENS address of a domain owned by a registrar (e.g. 'sample.payable.test.evan')
#. ``accountId`` - ``string``: account that performs the action; must be parent owner of given domain
#. ``validUntil`` - ``number|string``: js timestamp, when name resolution stops

-------
Returns
-------

``Promise`` returns ``void``: resolved when done

-------
Example
-------

.. code-block:: typescript
await nameResolver.setValidUntil(
'payable.registrar.test.evan',
'0x1111111111111111111111111111111111111111',
Date.now() + 60000,
);
--------------------------------------------------------------------------------

.. _name_resolver_getValidUntil:

getValidUntil
================================================================================

.. code-block:: typescript
nameResolver.getValidUntil(name);
Get timestamp, when domain will stop resolval.

----------
Parameters
----------

#. ``name`` - ``string``: domain to get valid until for

-------
Returns
-------

``Promise`` returns ``string``: js timestamp, when resolver lookup will expire

-------
Example
-------

.. code-block:: typescript
console.log(await nameResolver.getValidUntil('payable.registrar.test.evan'));
// Output:
// 1544630375417
--------------------------------------------------------------------------------

.. _name_resolver_claimFunds:

claimFunds
================================================================================

.. code-block:: typescript
namerResolver.claimFunds(name, accountId);
Claim funds for domain.

----------
Parameters
----------

#. ``name`` - ``string``: ENS address of a domain owned by a registrar (e.g. 'sample.payable.test.evan')
#. ``accountId`` - ``string``: account that performs the action (needs proper permisions for registrar)

-------
Returns
-------

``Promise`` returns ``void``: resolved when done

-------
Example
-------

.. code-block:: typescript
await nameResolver.claimFunds(
'payable.registrar.test.evan',
'0x1111111111111111111111111111111111111111',
);
Expand Down Expand Up @@ -612,6 +851,7 @@ Returns
``string``: converted address



.. required for building markup
.. |source executor| replace:: ``Executor``
Expand Down
Loading

0 comments on commit 3313974

Please sign in to comment.