How to minting and earn DEV

You have the power of minting DEV if you registered some npm package(s) to Dev Protocol.

If you first time, also check how to register your package(s).

We’ll provide a user-friendly UI in the future, but it’s not yet available, so manual operation is required for the minting, however.

This post will walk you through manually minting DEV. Let’s begin!

First, get the Metrics address.

Metrics are a contract that associates Market and Property. To minting DEV, execute by passing Metrics address to “allocate” method of Allocator contract.

In the Dev Protocol, there are multiple Markets, and Markets and Properties have a many-to-many relationship. However, for now, there is only NpmMarket, so this time I assume NpmMarket.

To get a Metrics address, open the NpmMarket contract page. And enter the npm package name into the “_package” field in the “getMetrics” section.

Next, click the “Query” button. After a while, the response is shown. This is the Metrics address!

Please copy the address.

Let’s minting!

To minting DEV, just execute the “allocate” method in the Allocator contract.

Open the Allocator contract page, connect to your wallet.

Next, enter the Metrics address into the “_metrics” field in the “allocate” section. This address got in the previous step.

Then, click the “Write” button and confirm the transaction. After showing the “View your transaction” link, click it to open the transaction information page.

Wait until the status became “Success.” After a while, the result will be reflected in the Property contract associated with Metrics.

How to detect the finish of the mint?

Open the “Events” tab in the Allocator contract page, reload every few minutes until appearing a new event named “AllocationResult.”

When it was shown, open the details. Then, check _metrics” in the event data, if the value equals the Metrics address, it’s completed!

Note: If the asset valuation of the metrics is too less(less than 1/1000000000000000000) for the total asset valuation, the contract issuing an error and stop the execution.

https://etherscan.io/tx/0xdcda3db70e0e12dc535fda224ca8b981d3d2ed9ae086bab10142517e71cca2c5

How to know the amount of DEV that a Property holder(s) can receive.

Open the Withdraw contract page, enter the Property address and the user(your) address in the “calculateWithdrawableAmount” section, and click the “Query” button.

How to know the amount of DEV as a staking reward.

Open the Lockup contract page, enter the Property address and the user(your) address in the “calculateWithdrawableInterestAmount” section, and click the “Query” button.

All numerical results are value multiplied by 1000000000000000000. So that is, in actual, it’s a number divided by 1000000000000000000.

I will explain the withdrawal method in another post, wait for a minute!

Dev Protocol🌐 https://devprtcl.com/

Join our Discord👾 https://discord.gg/VwJp4KM

Follow our Twitter🐤 https://twitter.com/devprtcl

--

--