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.
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.
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.