by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 22 05:33
    xpepermint assigned #695
  • Sep 21 21:15
    fulldecent opened #695
  • Aug 29 11:53

    xpepermint on master

    Create FUNDING.yml (compare)

  • Aug 12 14:00

    xpepermint on master

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

  • Aug 12 14:00
    xpepermint closed #694
  • Aug 12 13:56
    codecov-commenter commented #694
  • Aug 12 13:55
    codecov-commenter commented #694
  • Aug 12 13:34
    codecov-commenter commented #694
  • Aug 12 12:46
    xpepermint opened #694
  • Aug 12 12:17
    MoMannn closed #693
  • Aug 12 12:17
    MoMannn commented #693
  • Aug 12 12:13
    xpepermint commented #693
  • Aug 12 11:58
    MoMannn commented #693
  • Aug 12 11:53
    xpepermint labeled #693
  • Aug 12 11:53
    xpepermint assigned #693
  • Aug 12 11:53
    xpepermint opened #693
  • Aug 12 11:21
    xpepermint closed #691
  • Aug 12 11:21

    xpepermint on master

    Update wanchain testnet url. Update eslint config. Fix line length. and 4 more (compare)

  • Aug 12 11:21
    xpepermint closed #692
  • Aug 12 09:41
    codecov-commenter commented #692
Tadej Vengust
@MoMannn
Can you set in options verbose: true
and try again
This should print out a bit more information about what is going on and if you could print them here
This stopped working when you upgraded to 2.0.2?
Azlan
@azizazlan

Hi @MoMannn, I tried again as the followings:

const run = async () => {
    var options = {
        verbose: true,
        sandbox: false,
        network: "rinkeby",
        clientId: "02042...096d01a54a",
        credentialsId: "82471...6f9571449de",
        credentialsSecret: "31uHwzy5SvxMHD...BuSSWvx"
    };
try{
    var bitskiBackEndProvider = new BitskiProvider(options);
    const availableAccounts = await bitskiBackEndProvider.getAvailableAccounts();
    console.log(availableAccounts);
}catch(error){
console.error(error);
}

Error:

[InternalError: Internal error] { code: -32603 }
ProviderError: GenericProvider error [issue: 0]
    at /Users/azlan/Projects/waqafminter/node_modules/@0xcert/ethereum-generic-provider/dist/core/provider.js:194:23 {
  issue: '0',
  original: [InternalError: Internal error] { code: -32603 }
}

It was working with version 2.0.2. Just to be sure, I also created a new Bitski app(called "waqafminter") and create different clientId, credentialsId and credentialsSecret. And another wallet for the app inside Bitski developer page.

Thank you.

I also try the old code using version 1.9.0. Now even the old ones does not work and gave the same error. I got the feeling its on the Bitski side.
Tadej Vengust
@MoMannn
will ask bitski if they are experiancing any problems
Azlan
@azizazlan
Thank you @MoMannn
Tadej Vengust
@MoMannn
@azizazlan Bitski responded that they had an issue in one of their regions and should be back online now,
Can you check everything is ok now?
Azlan
@azizazlan
It is working now. Perhaps the South East Asia region and we are located in Kuala Lumpur, Malaysia. Thanks @MoMannn !
Tadej Vengust
@MoMannn
No problem :)
Azlan
@azizazlan

Hi,

Just want to confirm...

In the 0xcert-ethereum-asset-ledger/src/core/ledger.ts:

public async updateAsset(assetId: string, recipe: AssetLedgerObjectUpdateRecipe)

where assetId is the existing id of the asset we want to update. To get the recipe, you need id, imprint and receiverId. In other words, we can change the recipe to whatever we wish to update, including a new receiverId (new owner)?

Tadej Vengust
@MoMannn
You can only change the imprint this way
Azlan
@azizazlan
Thanks!
Azlan
@azizazlan
Is there a way to get transactions history of updates we made on the imprints from the AssetLedger?
Tadej Vengust
@MoMannn
Each imprint update throws an event to which you can hook
Azlan
@azizazlan
Yes thank you @MoMannn
Quyen Nguyen
@qnguyen12
@MoMannn Could we set gasPrice while deploying asset ledgers and creating assets?
Tadej Vengust
@MoMannn
You can set gasPriceMultiplier. Gas price is calculated as: current ethereum gas price (eth_gasPrice) * multiplier
so you can set 0.8 or 1.5 or 3 depending on how fast you want the transaction togo through
Azlan
@azizazlan
Hi all, just want to understand more about 0xcert's AIH algorithm. What exactly it is? Perhaps you could kindly point the (ts) files I should read and understand in the https://github.com/0xcert/framework
Azlan
@azizazlan
Ok maybe I should start by asking what is AIH means?
Azlan
@azizazlan
Yes! Thank you. Thank you @xpepermint .
Kristijan Sedlak
@xpepermint
Np
Azlan
@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
@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
@azizazlan
Thank you. Learnt a lot!
Kristijan Sedlak
@xpepermint
👍
Azlan
@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
@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
@azizazlan
Embarrassingly the error is because of the insufficient fund! :-(
Azlan
@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
@azizazlan
I understand. No, it has nothing to do with 0xcert. Thanks @xpepermint !