Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 20 19:30
    fulldecent commented #710
  • May 20 19:30
    fulldecent closed #710
  • May 20 16:38

    xpepermint on master

    Allow women, and more, to own t… Merge branch 'master' into patc… Merge branch 'master' into patc… and 1 more (compare)

  • May 20 16:38
    xpepermint closed #709
  • May 20 09:27
    codecov-commenter commented #709
  • May 20 09:25
    codecov-commenter commented #709
  • May 20 08:31
    codecov-commenter commented #709
  • May 20 08:30
    codecov-commenter commented #709
  • May 20 08:08
    codecov-commenter commented #709
  • May 20 08:07
    xpepermint synchronize #709
  • May 20 08:07

    xpepermint on master

    Allow women, and more, to own t… Merge branch 'master' into patc… Merge pull request #708 from fu… (compare)

  • May 20 08:07
    xpepermint closed #708
  • May 20 08:05
    codecov-commenter commented #708
  • May 20 07:17
    xpepermint assigned #707
  • May 20 06:59
    xpepermint synchronize #708
  • May 20 06:58
    xpepermint synchronize #709
  • May 20 06:57
    xpepermint commented #710
  • May 20 06:42

    xpepermint on master

    No need to SLOAD+SSTORE eip-2200 eip-2200 and 2 more (compare)

  • May 20 06:42
    xpepermint closed #711
  • May 20 03:08
    codecov-commenter commented #711
Tadej Vengust
@MoMannn
@fjmontesinos Toggle transfer stops all transfers. It would make sense not to create the token until you know the recipient or use atomic actions for asset creation where anyone can become the recipient or you specify it beforehand.
Kristijan Sedlak
@xpepermint
@abkumbar_gitlab Looks like missing node devDependency @types/node needed to compile Typescript (not FW related).
Azlan Aziz
@azizazlan
@MoMannn thank you!
Abhi K
@abkumbar_gitlab
@xpepermint Thanks! Yeap not a FW issue, turned out emberjs polyfill issue. Appreciate it.
Javier Montesinos
@fjmontesinos
Thanks!!! @azizazlan
Abhi K
@abkumbar_gitlab
@xpepermint qq: I'm trying to deploy an asset ledger, via inputs from a simple form. When I try to deploy ledger, I get below invalid bytes4 value error. Any ideas on what I might be missing? asset ledger definition included in the console output.
image.png
Abhi K
@abkumbar_gitlab
image.png
Tadej Vengust
@MoMannn
@abkumbar_gitlab Can you check your capabilities? It looks like you have 2 duplicated and 16 is not an existing capability.
Also check this working live example: https://codesandbox.io/s/github/0xcert/example-asset-management?module=%2FREADME.md it may help you.
Abhi K
@abkumbar_gitlab
@MoMannn Updating asset capabilities resolved it. I guess I'm a little confused on where to set Super/General Asset Ledger Abilities. I was setting all three abilities during ledger creation, which is why you saw duplicate Ids as SuperAssetLedgerAbility.ALLOW_MANAGE_ABILITIES and AssetLedgerCapability.UPDATE_ASSET have Id 2, and GeneralAssetLedgerAbility.CREATE_ASSET has id 16. Any ideas on how/where I can set super/geneal ledger abilities?
Tadej Vengust
@MoMannn
Ones are capabilities of an ledger ones are abilities of a user for that ledger.
Abhi K
@abkumbar_gitlab
Thanks @MoMannn that's helpful. Can you recommend any resources on how to use bitski or Metamask to sign into an dapp, like you guys do for logging into 0xcert api dashboard?
Kristijan Sedlak
@xpepermint
@abkumbar_gitlab search the web for "login with signature". The process is super simple. A user signes an arbitrary message with a private key (e.g. Metamask) and sends it to the server. The server extracts user's wallet address (a public key) from the received signature which represents a unique id of a user. It's similar to JWT authentication but here a user generates the token.
Abhi K
@abkumbar_gitlab
Awesome, will give it a try. Thanks!
Karega McCoy
@karega
Hello. If I want to interact with a smart contract does this framework provide that functionality?
Kristijan Sedlak
@xpepermint
Yes but depends on your use case. Please explain.
Karega McCoy
@karega
I just want to call functions on a smart contract through a provider.
Kristijan Sedlak
@xpepermint
0xcert is optimized for NFTs. If you work with NFTs then this is the framework for you. You can also use any 0xcert provider to perform a direct call to any contract but you should be familiar with how things actually work in Ethereum to be able to do that.
Karega McCoy
@karega
Ahh so there's no API that does it. I was looking through the documentation trying to find it.
Tadej Vengust
@MoMannn
 const functionSignature = '0x6e553f65';
        const inputTypes = ['uint256', 'address'];
        const attrs = {
          from: 'address',
          to: 'address'
          data: functionSignature + provider.encoder.encodeParameters(inputTypes, ['uint256', 'address']).substr(2)
        };
        const res = await provider.post({
          method: 'eth_sendTransaction',
          params: [attrs]
        });
        const mutation = new Mutation(provider, res.result);
here is an example of how you do it
provider has post opction where you can directly make a call
and .encoder option do encode / decode params for smart contracts
but you need to know how to make rpc call
Karega McCoy
@karega
Thanks
Azlan Aziz
@azizazlan

Hi, I had the following codes and it was working fine all along. I have the current version 2.0.2. Version 1.9.0 also works fine last time.

    var options = { 
        sandbox: false,
        network: "rinkeby",
        clientId: "xxx",
        credentialsId: "yyy,
        credentialsSecret:
            "zzz"
    };  
    var bitskiBackEndProvider = new BitskiProvider(options);
    const availableAccounts = await bitskiBackEndProvider.getAvailableAccounts();

with the following error:

(node:54968) UnhandledPromiseRejectionWarning: ProviderError: GenericProvider error [issue: 0]
    at /Users/azlan/Projects/myapp/node_modules/@0xcert/ethereum-generic-provider/dist/core/provider.js:194:23
Tadej Vengust
@MoMannn
That is weird
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 Aziz
@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 Aziz
@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 Aziz
@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 Aziz
@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 Aziz
@azizazlan
Thanks!
Azlan Aziz
@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 Aziz
@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