Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@authereum/contracts

Package Overview
Dependencies
Maintainers
3
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@authereum/contracts

Ethereum smart contract for Authereum

  • 0.0.2-beta.35
  • npm
  • Socket score

Version published
Weekly downloads
103
decreased by-0.96%
Maintainers
3
Weekly downloads
 
Created
Source

Authereum Contracts

Ethereum smart contracts for Authereum

License dependencies Status

⚠️ This code has not been audited. Not recommended to use in production.

Config

Environment variables:

NETWORK_NAME=kovan
ETH_HTTP_PROVIDER_URI='https://kovan.rpc.authereum.org'
SENDER_ADDRESS=0x...
SENDER_PRIVATE_KEY=0x...
LOGIC_ADDRESS=0x...
OZ_SESSION_PATH=/absolute-path-to/.openzeppelin/.session

You may also set the config by invoking the setConfig(config) static method.

Deploy

The first thing required for deployment of the proxy accounts is the deployment and setup of ENS on the appropriate network. To do this, run the deploy script in './deploy/ensDeploy.ts'. Once this has been completed, the ENS Manager addresses can be used in the initialization of the AuthereumAccount.

# Deploy the logic contract. Should only be called once.
npx openzeppelin push --network development

# Deploy a user's account
npx openzeppelin create2 AuthereumAccount --salt 1234 --from 0x0000000000000000000000000000000000000000 --network kovan --init initialize --args 0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000,ensname,1234

Versioning

All the versioning in the Authereum system will use Unix timestamps. A dictionary will be kept that maps version numbers to human-readable names.

Advantage of Unix Timestamp:

  • Consistent versioning
  • Easy file/variable naming
  • Infinitely scalable

Design Decisions:

  • Semantinc versioning is hard to do on file names and variables
  • Sequential may cause issues down the road (ie renaming files/contracts to have more left padding)

Addresses

Kovan

Authereum Account v2019102500 = '0xFF8C7Ed14a7D3c3Cb0d62Ef001cAD39746642B33' Authereum Account v2019111500 = '0x8bb37aE005ADa8f7c1033843A7c7eB3004c64888'

Goerli

Authereum Account v2019102500 = '0x1d445c2B2F78e81B62bec0793D9823B462858651' Authereum Account v2019111500 = '0x16766E4a74433c359D8d2F31F84a6eB6d3F4d7B3'

Rinkeby

Authereum Account v2019102500 = '0x0f95c1bfD98FeB165ab3B018d5DC770c27a3346e' Authereum Account v2019111500 = '0xC157873c86D78b7151670fbaB4C163383a164355'

Ropsten

Authereum Account v2019102500 = '0x3D1F792509293abCb451316C9f52dDA6482604e4' Authereum Account v2019111500 = '0x5811DD6b41942b7B6c9C65887a80214203f23Ed3'

Mainnet

Authereum Account v2019102500 = '0xD8CaB604BDd8cBb7c3eb0c26f7DC3AbFfb005A92' Authereum Account v2019111500 = '0x185c46c8d3EF5155F3678e69c827dB7a2116a6Cd'

Test

npm run ganache
make test

Upgrading

Set up upgrade environment:

npm install
npx openzeppelin add AuthereumAccount

FAQ

  • Why am I getting the following when I update my oz project or run a test?

    connection not open on send()
    connection not open
    
    • Try restarting ganache and runnning npm run truffle-reset
    • Try running ganache-cli on a different port (either 8545 or 9545)

    Update: 11/19/19 - This error is related to using WebSockets. If this error persists, try using https instead, if possible.

  • Why is my test failing on a simple test? It seemingly reverts even when it shouldn't.

    • It is because you are running out of gas. There is an issue with zos (<2.4.0) and ganache (>= 6.4.0) where gas estimation does not work. You must manually set the gasLimit in the transaction, for now. See here for the proposed fix in 2.4.0rc2.
  • Why are my tests not running with Returned values aren't valid, did it run Out of Gas?

    • You are trying to deploy on a different network. Try changing the .env file to reflect the network you are trying to depoy on.

    • Delete the build folder and run truffle complie && truffle migrate --reset

  • Why am I getting the following error when running tests?

Error: EnsRegistry error: contract binary not set. Can't deploy new instance.
This contract may be abstract, not implement an abstract parent's methods completely
or not invoke an inherited contract's constructor correctly
  • Delete the build folder and run truffle complie && truffle migrate --reset

  • Why are my tests not running at all (and the output says 0 passing)

    • This happens because there are no actual tests (i.e. there is no it(){}). It is likely that you only have describe(){} and/or context(){}.

License

MIT

FAQs

Package last updated on 03 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc