Coder Social home page Coder Social logo

imx-contracts's People

Contributors

alex-connolly avatar allan-almeida avatar andrew-yangy avatar brayansdt avatar calvwang9 avatar carleeto avatar charlie-chau avatar ckailash avatar codeschwert avatar dlip-immutable avatar kaihirota avatar moot33 avatar samueltan-immutable avatar shineli1984 avatar shirren avatar sprngbk avatar sschulz-t avatar stevemao avatar zatlite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imx-contracts's Issues

Read Me is Inaccurate

Following instructions under "No Code Usage" fails and once I figured out (or think I did) what needs to change.

npm install typescript and some other stuff,
rename .env.example to .env,
provide DEPLOYER_MAINNET_PRIVATE_KEY (even though I want to go to ropsten.

It still fails because it seems its trying to deploy to the main ethereum even though the command I run is "yarn hardhat run deploy/asset.ts --network ropsten"

If I leave out the mainnet key It complains about that.

This is the result

No need to generate any newer typings. Deploying Contract with the account: 0x75965652aC872E3A9fd3c9ad8E290473c23d763c Account Balance: 63000 Error: insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.6.2) at Logger.makeError (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/@ethersproject/logger/src.ts/index.ts:261:28) at Logger.throwError (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/@ethersproject/logger/src.ts/index.ts:273:20) at checkError (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:81:16) at /Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:243:24 at processTicksAndRejections (internal/process/task_queues.js:97:5) { reason: 'insufficient funds for intrinsic transaction cost', code: 'INSUFFICIENT_FUNDS', error: ProviderError: insufficient funds for gas * price + value at HttpProvider.request (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/hardhat/src/internal/core/providers/http.ts:74:19) at LocalAccountsProvider.request (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/hardhat/src/internal/core/providers/accounts.ts:182:36) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async EthersProviderWrapper.send (/Users/rick/dev/projects/weav/backend/nftPlayground/imx-contracts/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20), method: 'sendTransaction', transaction: undefined } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. imx-contracts[main]$ yarn hardhat run deploy/asset.ts --network ropsten yarn run v1.22.18

mint_unwithdrawable

execution reverted. This is usually caused by a mismatch between your token's ID/blueprint and your smart contract's mintFor logic.

Using IERC721Enumerable

Curious on leveraging totalSupply() based off IERC721Enumerable, is this possible. Any reference point yall can point me to for it to work with IMX

Alchemy does not support Ropsten anymore

I'm trying to go through the documentation and deploy the GU contract but I'm unable to create a Ropsten alchemy node. In addition, it seems that the code does not support any other testnets?

deploy/registration.ts uses incorrect address in constructor

within ./deploy of imx-contracts there is the registration.ts:

import { ethers, hardhatArguments, run } from "hardhat";
import { getIMXAddress } from "./utils";

async function main() {
    const [deployer] = await ethers.getSigners();

    console.log("Deploying Contracts with the account:", deployer.address);
    console.log("Account Balance:", (await deployer.getBalance()).toString());

    if (!hardhatArguments.network) {
        throw new Error("please pass --network");
    }
    await deploy(hardhatArguments.network);
}
function sleep(ms: number) {
    return new Promise(resolve => setTimeout(resolve, ms));
}
async function deploy(network: string) {
    const Registration = await ethers.getContractFactory("Registration");
    const imx_address = getIMXAddress(network);
    const asset = await Registration.deploy(imx_address);
    console.log("Deployed Contract Address:", asset.address);
    console.log('Verifying contract in 5 minutes...');
    await sleep(60000 * 5);
    await run("verify:verify", {
        address: asset.address,
        constructorArguments: [
            imx_address
        ],
    });
}

main()
    .then(() => process.exit(0))
    .catch((error) => {
        console.error(error);
        process.exit(1);
    });

Where imx_address is 0x3e6e01355bB66925a65D372bf9c9f3835d9964fA , 0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623 or 0x5FDCCA53617f4d2b9134B29090C87D01058e27e9; one of the Core (StarkEx Bridge) Contract addresses. Shouldn't imx_address be one of the User Registration Contract addresses?

distinction between "advanced" usage and "basic" usage is unclear

in the readme it mentions for "basic usage" we should subclass Mintable and _mintFor - and for advanaced usage we should subclass IMintable and mintFor -

Looking at their code, I see mintable will unpack the mintingblob for us, put it in storage, and pass it on to _mintFor - which we can then subclass with the unpacked mintingblob as a blueprint.

But uhh what is advanced usage? Is there any reason we would want to do anything different than what Mintable does?

Are there any sample BluePrints and MintingBlobs out there I can look help to help understand?

npm install faild

I really want to use immutable, but run npm install @imtbl/imx-contracts give fatal error

1604 timing build:link Completed in 15ms
1605 info run [email protected] install node_modules/keccak node-gyp-build || exit 0
1606 info run [email protected] install node_modules/secp256k1 node-gyp rebuild
1607 info run [email protected] install { code: 0, signal: null }
1608 timing build:run:install:node_modules/keccak Completed in 86ms
1609 info run [email protected] install { code: 1, signal: null }
1610 timing reify:rollback:createSparse Completed in 481ms
1611 timing reify:rollback:retireShallow Completed in 0ms
1612 timing command:install Completed in 9314ms
1613 verbose stack Error: command failed
1613 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
1613 verbose stack     at ChildProcess.emit (node:events:520:28)
1613 verbose stack     at maybeClose (node:internal/child_process:1092:16)
1613 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
1614 verbose pkgid [email protected]
1615 verbose cwd R:\html\immxTest
1616 verbose Windows_NT 10.0.19044
1617 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "@imtbl/imx-contracts"
1618 verbose node v16.14.0
1619 verbose npm  v8.3.1
1620 error code 1
1621 error path R:\html\immxTest\node_modules\secp256k1
1622 error command failed
1623 error command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild

here is error log:
2022-04-08T16_27_04_010Z-debug-0.log

Can't continue develop, what shoud I do, can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.