Comments (2)
Can you show the code you are using to deploy the contract?
from canvas.
It seems this is now working. Not sure what I changed, other than the fact that I was tired yesterday, from trying around random things in desperation.
This version is currently working. I just need to understand a bit more how the endowment works, since these values were put at random to see what sticks, but at least the deploy itself is working
(I'm building this deploy script while cargo contract deploy
isn't working, and also so that I can learn how these pieces work
const { ApiPromise, WsProvider } =require("@polkadot/api");
const { Keyring } = require("@polkadot/keyring");
const { createTestKeyring } = require("@polkadot/keyring/testing");
const { CodePromise } = require("@polkadot/api-contract");
const fs = require("fs");
const ABI = require("../contracts/hello/target/ink/metadata.json");
const WASM = fs.readFileSync("../contracts/hello/target/ink/world.wasm");
(async() => {
const provider = new WsProvider("ws://127.0.0.1:9944");
const api = await ApiPromise.create({ provider });
const keyring = new Keyring({ type: 'sr25519', ss58Format: 42 });
const alice = keyring.addFromUri('//Alice', { name: 'Alice' });
const account = (await createTestKeyring().getPairs())[0];
const code = new CodePromise(api, ABI, WASM)
code.tx.default({ gasLimit: 100000 * 1000000, salt: null, value: 2230000000000000 })
.signAndSend(alice, (result) => {
if (result.status.isInBlock || result.status.isFinalized) {
// here we have an additional field in the result, containing the blueprint
blueprint = result.blueprint;
}
})
})()
from canvas.
Related Issues (20)
- Look into adding `pallet-assets` HOT 10
- Verify Rococo deployment HOT 1
- Get Canvas running on Rococo again
- Update Teleport Section in README HOT 1
- Provide latest release as binary HOT 1
- Init.sh requires nightly-2020-10-05 HOT 1
- `Gas instrumentation failed` when `--execution Wasm` is passed HOT 2
- License
- Parachain HOT 5
- Tag HOT 1
- Error during compilation. Could not compile `multihash-derive` HOT 4
- Keep Persistent Contract State HOT 3
- Unable to decode storage system.account [Error] HOT 7
- tags v0.1.8 install failed HOT 2
- How to increase block gas limit HOT 2
- Error starting a node: canvas --dev --tmp HOT 1
- Concurrent connection limit of websocket
- "multiple `intersperse` found"-Error when installing canvas-node HOT 11
- Follow up with `chain-spec` configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canvas.