Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 15 15:29

    xpepermint on master

    Bump version Merge pull request #705 from xp… (compare)

  • Mar 15 15:29
    xpepermint closed #705
  • Mar 15 14:43
    xpepermint opened #705
  • Mar 15 13:34
    xpepermint closed #704
  • Mar 15 13:34

    xpepermint on master

    Update metamask provider to wor… Webpack build. Update wanchain network version. and 1 more (compare)

  • Mar 15 12:39
    MoMannn synchronize #704
  • Mar 15 12:25
    MoMannn review_requested #704
  • Mar 15 12:25
    MoMannn opened #704
  • Jan 20 08:19
    leonpanjtar removed as member
  • Jan 20 08:19
    davision removed as member
  • Jan 14 11:34

    xpepermint on master

    Bump version Merge pull request #703 from xp… (compare)

  • Jan 14 11:34
    xpepermint closed #703
  • Jan 14 10:14
    xpepermint opened #703
  • Jan 14 09:44
    MoMannn closed #701
  • Jan 14 09:39

    xpepermint on master

    Bump ethereum utils contracts t… Bump ethereum erc20 contracts t… Bump erc721 contracts to solidi… and 10 more (compare)

  • Jan 14 09:39
    xpepermint closed #702
  • Jan 14 08:57
    codecov-io commented #702
  • Jan 14 08:34
    MoMannn closed #638
  • Jan 14 08:34
    MoMannn commented #638
  • Jan 14 08:33
    MoMannn edited #638
Azlan Aziz
@azizazlan
Yes! Thank you. Thank you @xpepermint .
Kristijan Sedlak
@xpepermint
Np
Azlan Aziz
@azizazlan
The statement from the documentation, The data[0].nodes[0].hash path is the root hash which represents asset imprint and should be saved to the blockchain. What is the smart contract (perhaps, you can point to the *.sol file) that responsible to execute the following codes:
const mutation = await assetLedger.createAsset({
  id: '100',
  imprint: 'aa431acea5ded5d83ea45f1caf39da9783775c8c8c65d30795f41ed6eff45e1b', 
  receiverId: provider.accountId,
}).then((mutation) => {
    return mutation.complete();
});
Azlan Aziz
@azizazlan

For example, in the framework/packages/0xcert-ethereum-erc721-contracts/src/contracts/nf-token.sol, the mapping variable idToOwner:

  /**
   * @dev A mapping from NFT ID to the address that owns it.
   */
  mapping (uint256 => address) internal idToOwner;

Does the uint256 represent imprint or asset id?

Kristijan Sedlak
@xpepermint
The smart contract is the one you deployed - we call it an Xcert and the JS interface AssetLedger interacts with it. The deployment process is covered here https://docs.0xcert.org/api/guides/asset-ledger-deployment.html.
Azlan Aziz
@azizazlan
Thank you. Learnt a lot!
Kristijan Sedlak
@xpepermint
👍
Azlan Aziz
@azizazlan
Let' say two persons (the first is genuine party and the second is an imitator/faker) "accidentally" deployed two AssetLedgers, both with an identical AssetLedger's definition (and schemaId). Possible right? If so, the only thing that can differentiate between them is the address of the AssetLedger. Is this correct?
Tadej Vengust
@MoMannn
Correct
Nathaniel
@NathanielCoder_twitter
Hi. I am new. Soon will be released Ethereum 2.0 , how much does it change for you and code, will you support Ethereum 2.0? If I or someone plans to use your project, how long do you plan to support it (code updates, fixes and improvements, new versions), what is time span you plan to support project?
Kristijan Sedlak
@xpepermint
We already did some tests for 2.0 and it should work.
We will add necessary changes as needed.
Nathaniel
@NathanielCoder_twitter
ok, thank you.
Nathaniel
@NathanielCoder_twitter
I am new to blockchain programming, I have mostly worked as a developer in MS Visual Studio .NET. What plans do you have in future versions? Some improvements, new releases? How you value your product among others? I think NFTs will be big in coming years, however competition in other coins (ICX, BNB, ...) is making also their efforts. What do you think is necessary to do next? Is it improving IDE, or improving API, framework. What are next plans for marketing? I have been working in development and in sales, and I understand importance of marketing, and I dont think development team can do it themselves simply because of time and focus on the current task. Only fully focused marketing and sales people can "sell" product.
Nathaniel
@NathanielCoder_twitter
any news?
Kristijan Sedlak
@xpepermint
@NathanielCoder_twitter This is not a place to discuss marketing and trading opportunities.
Nathaniel
@NathanielCoder_twitter
ok, I understand, thanks for follow back
Azlan Aziz
@azizazlan

Hi All,

Had issue GenericProvider error again, but the following code (0xcert version 2.02) works on rinkeby and not mainnet. Contacted Bitski (via Discord.com) and they said they had no regional issue. Fyi, I have 0.01 Ether in my wallet (mainnet) - or is it insufficient?

const { BitskiProvider } = require("@0xcert/ethereum-bitski-backend-provider");
const { Cert } = require("@0xcert/cert");
const {
    AssetLedger,
    AssetLedgerCapability
} = require("@0xcert/ethereum-asset-ledger");
const { schema } = require("./0xcert/conventions/schema.js");
const Web3 = require("web3");
const inquirer = require("./inquirer");
const dotenv = require("dotenv");
dotenv.config();

const run = async () => {
    const whichNetwork = await inquirer.askWhichNetwork();
    const network = whichNetwork.network;

    var options = {
        sandbox: false,
        // network: `${process.env.NETWORK}`,
        network: network,
        clientId: `${process.env.BITSKI_CLIENTID}`,
        credentialsId: `${process.env.BITSKI_CREDENTIALSID}`,
        credentialsSecret: `${process.env.BITSKI_CREDENTIALSSECRET}`
    };

    var bitskiBackEndProvider = new BitskiProvider(options);
    const availableAccounts = await bitskiBackEndProvider.getAvailableAccounts();

    const web3 = new Web3(bitskiBackEndProvider);

    const anAsyncFunction = async account => {
        return {
            accountId: account,
            balance: web3.utils.fromWei(await web3.eth.getBalance(account))
        };
    };
    const availableAccountsWithBalances = await Promise.all(
        availableAccounts.map(account => anAsyncFunction(account))
    );
    const inqWhichAccountToUse = await inquirer.askWhichAccountToUse(
        availableAccountsWithBalances
    );
    // setup options again to include which account we gonna use
    options = { ...options, accountId: inqWhichAccountToUse.accountId };
    console.log(options);
    bitskiBackEndProvider = new BitskiProvider(options);

    const cert = new Cert({ schema });
    const schemaId = await cert.identify();

    const assetLedgerDefinition = {
        name: "Tank Asset Ledger",
        symbol: "TAL",
        uriPrefix: "https://myweb.io/assets/",
        uriPostfix: ".json",
        schemaId: schemaId, // base asset schemaId
        capabilities: [
            AssetLedgerCapability.REVOKE_ASSET,
            AssetLedgerCapability.TOGGLE_TRANSFERS
        ]
    };

    console.log(assetLedgerDefinition);

    const inqPerformTx = await inquirer.askConfirmToPerformTx();
    if (inqPerformTx.confirmToPerformTx === "no") {
        process.exit(0);
    }

    const mutation = await AssetLedger.deploy(
        bitskiBackEndProvider,
        assetLedgerDefinition
    );

    await mutation.complete();
    const assetLedgerId = mutation.receiverId;

    console.log(`AssetLedgerId: ${assetLedgerId}`);
    process.exit(0);
};

run();
Azlan Aziz
@azizazlan
Embarrassingly the error is because of the insufficient fund! :-(
Azlan Aziz
@azizazlan
ProviderError: GenericProvider error [issue: 0]
    at /Users/azlan/Projects/myapp/node_modules/@0xcert/ethereum-generic-provider/dist/core/provider.js:194:23 {
  issue: '0',
  original: [InternalError: Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 482596591400000000 and got: 10000000000000000.] {
    code: -32603
  }
Required 0.4825965914 Ether to deploy an AssetLedger, isn't it quite expensive?
Fyi, the last AssetLedger (1 year ago) instance cost me 0.03668478 Ether
Kristijan Sedlak
@xpepermint
ETH gas prices are insane these days because of the sushi defi “game” and the price you pay has nothing to do with the 0xcert code.
You should check https://ethgasstation.info
Azlan Aziz
@azizazlan
I understand. No, it has nothing to do with 0xcert. Thanks @xpepermint !
Azlan Aziz
@azizazlan

Hi All, has anyone got any tip or idea how this framework can be used in conjunction with the ethereum/EIPs#725 and ethereum/EIPs#735?

Or is it just simply create/transfer the asset to the ERC725 contract address (since according to the standard, identity is represented by the contract address)? Or the issuer of the asset (AssetLedger) add the asset claim to the contract (ERC 735)?

Tadej Vengust
@MoMannn
@azizazlan From contracts standpoint everything is compatible with 0xcert protocol (our own contracts).
As far as 0xcert framework is concern it will not work out of the box. Since asset creations etc. make transactions directly to 0xcert procotol smart contracts not to the proxy contracts that the above standards describe.
To make framework compatible would take quite some changes to the logic.
You can always use framework to do direct rpc calls from any of the providers if you want to interact with custom contracts like these proxy contracts but this is quite a bit more advance usage.
In this case I would rather advise to use ethers.js or web3x to interacts with the proxy contract while 0xcert framework for everything else. You can also deploy with 0xcert framework and give all permission to the proxy contract.
Kristijan Sedlak
@xpepermint
Plus, open a new issue on github if you need a specific feature and we’ll discuss.
Azlan Aziz
@azizazlan
Thank you for the explanation
Azlan Aziz
@azizazlan
Will open an issue on the github
Henober
@henober
Hello, i have downloaded 0xcert framework from github. and i installed Node.js [Active LTS releases], NPM > v6.x however i'm unable to run the source code ! can anyone help how to run the framework on my pc ?
Azlan Aziz
@azizazlan
Hi @henober , the first time I learnt to use the framework was going through this tutorial...https://0xcert.org/news/0xcert-framework-tutorial-3-deploy-asset-ledger

Dear 0xcert developers,

The following lines of code (version 2.0.3) works on public testnet (Ropsten/Rinkeby etc) but the execution stuck at themutation.complete() line when use with ganache-cli or ganache.

const mutation = yield AssetLedger.deploy(                                                                                                                   
               provider,
               assetLedgerDefinition
          );

yield mutation.complete();
Kristijan Sedlak
@xpepermint
Please open a new issue. We can try upgrading ganache. 🙏
Azlan Aziz
@azizazlan
Thank you.
Ummer Irshad K
@ummerirshadk

I am trying to deploy asset ledger from NodeJs with Infura and Ropsten. Unfortunately I am getting below error

Error { ProviderError: GenericProvider error [issue: 0]
at Promise.catch (E:\Test\Blockchain\Oxcert\node_modules\@0xcert\ethereum-generic-provider\dist\core\provider.js:195:23)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'ProviderError',
issue: '0',
original:
{ code: -32601,
message:
'The method eth_sendTransaction does not exist/is not available' },
message: 'GenericProvider error [issue: 0]' }

Tadej Vengust
@MoMannn
Infura with http provider is limited only to read data. This is because you need to sign transactions with a private key to be able to send them to infura. You can achieve this by creating your own provider that accepts a private key with which you sign the transaction and sent it to infura. Here is a guide on creating you own provider: https://docs.0xcert.org/framework/v2/guides/providers.html#create-your-own-provider If you need help specifically how to create one for sending transaction to infura I can write up an example.
1 reply
nabenmes
@KEDGERS
Hello, i just came across the Swapmarket platform and would like to understand how to instantiate a separate platform based on the 0xcert platform. any pointer to documentation is appreciated. Thanks
Ummer Irshad K
@ummerirshadk
Thanks @Tadej for your response. Yes, appreciate if you could help me with some code samples to create custom provider to send transactions with infura. Basically, I am looking to create a ERC721 token with off-chain metadata with Oxcert OpenSource Framework.
Nick Bulka
@nbulka_twitter
hello, looking forward to starting development with 0xcert
Azlan Aziz
@azizazlan

Creating AssetLedger with Metamask Provider works but I can make it work with HttpProvider with a local geth node. The error was:

ProviderError: GenericProvider error [issue: 0]

import { HttpProvider } from "@0xcert/ethereum-http-provider";
import { AssetLedger, AssetLedgerCapability } from '@0xcert/ethereum-asset-ledger';

async function testMint() {
    const provider = new HttpProvider({
        url: "http://localhost:8545",
    });
    const assetLedgerDefinition = {
        name: 'Math Course Certificate',
        symbol: 'MCC',
        uriPrefix: 'https://0xcert.org/assets/',
        uriPostfix: '.json',
        schemaId: '3f4a0870cd6039e6c987b067b0d28de54efea17449175d7a8cd6ec10ab23cc5d', // base asset schemaId
        capabilities: [
             AssetLedgerCapability.REVOKE_ASSET,
       ],
    };
    try{
        const mutation = await AssetLedger.deploy(provider, assetLedgerDefinition);
        const transactionHash = mutation.id;
        await mutation.complete();
        const assetLedgerId = mutation.receiverId;
    }
    catch(error) {
        console.log(error);
    }
}
Azlan Aziz
@azizazlan
Hi, how do I deploy AssetLedger via node/express application on a local private geth (node) network? I tried to use HttpProvider and point to a geth node in which the account has been unlocked but it gave the provider error. Is this where I have to use custom provider?
Azlan Aziz
@azizazlan
When performed query provider.isSupported(), it return false which means that the provider is not supported by the environment. Is environment means the local geth node (http://localhost:8545)? So I assume the error is due to unsupported environment. If so how do I make the provider support the environment?