Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

General-purpose PKI on Ethereum

License

NotificationsYou must be signed in to change notification settings

urbit/azimuth

Repository files navigation

Build StatusMIT Licensenpm

A general-purpose PKI, live on the Ethereum blockchain.

Overview

This is just a quick summary of the different contracts and their purposes. For more detailed descriptions, see the inline documentation in the contracts themselves.

  • Azimuth: contains all on-chain state for azimuth. Most notably, ownership and public keys. Can't be modified directly, you must use the Ecliptic.
  • Ecliptic: is used as an interface for interacting with your points on-chain. Allows you to configure keys, transfer ownership, etc.
  • Polls: registers votes by the Galactic Senate on proposals. These can be either static documents or Ecliptic upgrades.
  • Linear Star Release: facilitates the release of blocks of stars to their owners over a period of time.
  • Conditional Star Release: facilitates the release of blocks of stars to their owners based on milestones.
  • Claims: allows point owners to make claims about (for example) their identity, and associate that with their point.
  • Censures: simple reputation management, allowing galaxies and stars to flag points for negative reputation.
  • Delegated Sending: enables network-effect like distributing of planets.
  • Planet Sale: gives an example of a way in which stars could sell planets on-chain.

Live contracts

The core Azimuth contracts can be found on the Ethereum blockchain.

Galactic Senate

A suggested process for publicizing the proposals voted on by the Galactic Senate is described insenate.md. Following that process, proposals that have been voted on and achieved majority can be found inproposals/.

Running

As a pre-requisite,truffle is required to be installed globally:

npm install -g truffle

Install dependencies. Most notable inclusion isZeppelin-Solidity.

npm install

Build, deploy and test viaTruffle using the following commands:

npx truffle compilenpx truffle deploynpx truffle test

When verifying deployed contracts on services like Etherscan, be sure to usetruffle-flattener for flattening contracts into single files.

Tests

To run the contract test suite automatically, use a simple:

npm test

This will spin up a localGanache node in the background. If you'd like to use a persistent node, you can run

npx ganache-cli --gasLimit 6000000

and then test vianpx truffle test.

For testing Ecliptic upgrades against whatever version of the contract is on mainnet, first run:

npm run fork-mainnet

This will start a local fork of mainnet, with the ownership addresses of the first 128 galaxies unlocked. Once that's ready, you can run the following in a separate terminal:

npm run test-upgrade//  or, to upgrade to a pre-existing contract, specify its address:npm run test-upgrade -- --target='0xabcd...'

This will deploy the Ecliptic contract currently in the repository to the local fork (or refer to the specified upgrade target), and test if it can be upgraded to cleanly. Because this involves many transactions (for voting), this may take a couple minutes.

There are also tests located intest-extras that are not meant to be run viaa basicnpx truffle test as they can fail nondeterministically. You can runthese via:

npm run test-extras

[8]ページ先頭

©2009-2025 Movatter.jp