GithubHelp home page GithubHelp logo

wasm-contract-deployment's Introduction

WASM Contract Deployment

Prerequisites

  • Node >= 16.0
  • yarn

Steps

  1. Clone the repo
    git clone https://github.com/5ire-tech/wasm-contract-deployment.git
    
  2. Go inside the folder
    cd wasm-contract-deployment
    
  3. Install the required dependencies
    yarn install
    
  4. In deploy.js:ln30 change the PHRASE variable (input the mnemonic phrase of the wallet having some 5ire coins to pay the transaction fee)
  5. Run code using
    node deploy.js
    

Resources

ERC721 Smart Contract template written by ink!

https://github.com/paritytech/ink-examples/tree/main/erc721

wasm-contract-deployment's People

Contributors

aligh98 avatar cocdap avatar dung5ire avatar s-h-ubham avatar saeedshokrane 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

wasm-contract-deployment's Issues

error catch TypeError: Cannot read properties of null (reading 'signAndSend')

Hi
wasm-contract-deployment error
PS D:\Testnet\wasm-contract-deployment> yarn install
yarn install v1.22.19
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

Done in 16.78s.
PS D:\Testnet\wasm-contract-deployment> node deploy.js
error catch TypeError: Cannot read properties of null (reading 'signAndSend')
at file:///D:/Testnet/wasm-contract-deployment/deploy.js:50:35
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

TypeError: Cannot read properties of undefined (reading 'address')

Hello!
wasm-contract-deployment error

PS D:\GIT\wasm-contract-deployment> node deploy.js
@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 10.1.11 node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/
@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/
@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 10.1.11 node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api-derive/node_modules/@polkadot/util-crypto/
@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-derive/node_modules/@polkadot/wasm-crypto/
@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 10.1.11 node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api-derive/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api/node_modules/@polkadot/util-crypto/
@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-derive/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto/
@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 10.1.11 node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api-derive/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api/node_modules/@polkadot/util-crypto/
esm 10.1.11 node_modules/@polkadot/api-contract/node_modules/@polkadot/util-crypto/
@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-derive/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-contract/node_modules/@polkadot/wasm-crypto/
@polkadot/util has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/util/
7.9.2
@polkadot/util-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/types/node_modules/@polkadot/util-crypto/
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/keyring/node_modules/@polkadot/util-crypto/
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/api-derive/node_modules/@polkadot/util-crypto/
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/api/node_modules/@polkadot/util-crypto/
10.1.11 /D:/GIT/wasm-contract-deployment/node_modules/@polkadot/api-contract/node_modules/@polkadot/util-crypto/
7.9.2
@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-derive/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/api-contract/node_modules/@polkadot/wasm-crypto/
esm 4.6.1 node_modules/@polkadot/wasm-crypto/
file:///D:/GIT/wasm-contract-deployment/deploy.js:60
address = response.contract.address.toString();
^

TypeError: Cannot read properties of undefined (reading 'address')
at file:///D:/GIT/wasm-contract-deployment/deploy.js:60:37
at file:///D:/GIT/wasm-contract-deployment/node_modules/@polkadot/api/promise/decorateMethod.js:61:22
at file:///D:/GIT/wasm-contract-deployment/node_modules/@polkadot/util/nextTick.js:14:7

@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.

@polkadot/wasm-crypto has multiple versions, ensure that there is only one installed.
Either remove and explicitly install matching versions or dedupe using your package manager.
The following conflicting packages were found:
esm 6.3.1 node_modules/@polkadot/types/node_modules/@polkadot/wasm-crypto/
esm 6.3.1 node_modules/@polkadot/keyring/node_modules/@polkadot/wasm-crypto/

Error RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low

Hello
Use the following guide to deploy a smart contract on the 5ire Native chain using a script.
https://docs.5ire.org/docs/DeploySmartContracts/NativeChain_WASM

Error:

2023-03-11 21:56:46 RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low

Big gas for a smart contract

Hi all.
When creating a smart contract in the native network, about 15 tokens are deducted from the address. Can't we regulate the gas itself when creating a smart contract? If earlier the faucet gave 100 tokens per address, now it gives 5 and thus does not create a smart contract in any way, a message about an insufficient balance.

how to fix this issue?

PS E:\VS GIT\6ire\wasm-contract-deployment> node deploy.js
node:internal/errors:496
ErrorCaptureStackTrace(err);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@polkadot/api-contract' imported from E:\VS GIT\6ire\wasm-contract-deployment\deploy.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:887:9)
at moduleResolve (node:internal/modules/esm/resolve:936:20)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap. (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.17.1

API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed

2023-02-16 10:01:38 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:40 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:43 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:45 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:48 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:51 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:53 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:56 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:01:58 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:01 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:04 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:06 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:09 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:11 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:14 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:17 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:19 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:22 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:24 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:27 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:29 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:32 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:36 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:38 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed
2023-02-16 10:02:41 API-WS: disconnected from wss://wss-testnet.5ire.network/: 1006:: connection failed

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.