Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@jwalab/tokenization-service-contracts
Advanced tools
The Tokenization Service's Smart Contract.
npm install @jwalab/tokenization-service-contracts
Example deploying the warehouse contract:
const { TezosToolkit, MichelsonMap } = require('@taquito/taquito');
const { InMemorySigner } = require('@taquito/signer');
const tokenizationServiceContracts = require('@jwalab/tokenization-service-contracts');
// using truffle's default accounts
// An account looks like this:
// alice: {
// pkh: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb",
// sk: "edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq",
// pk: "edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn"
// }
const accounts = require('./path/to/accounts');
const Tezos = new TezosToolkit();
Tezos.setProvider({
rpc: 'http://localhost:20000',
signer: new InMemorySigner(accounts.alice.sk)
})
Tezos.contract
.originate({
code: tokenizationServiceContracts.warehouse.michelson,
storage: {
owners: ["tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb"],
version: "1",
items: MichelsonMap.fromLiteral({}),
instances: MichelsonMap.fromLiteral({})
},
})
.then((originationOp) => {
console.log(`Waiting for confirmation of origination for ${originationOp.contractAddress}`);
return originationOp.contract(1, 1);
})
.then(() => {
console.log(`Origination completed.`);
})
.catch((error) => console.log(error));
Our Smart Contracts are fully tested, please look at the ./test
folder to see how they work and how to configure their storage.
frozen
.The Tezos contracts are written in the ./contracts
folder.
npm install
in this folderStart a tezos node first, use minilab or
docker run -d -p 20000:20000 -e block_time=2 tqtezos/flextesa:20210602 granabox start
Then run the tests:
npm run test
action | cost |
---|---|
warehouse origination | 0.626894ꜩ |
create warehouse item | 0.031207ꜩ |
Update same size warehouse item | 0.000733ꜩ |
Update smaller size warehouse item | 0.000708ꜩ |
Update bigger size warehouse item | 0.017005ꜩ |
Freeze item | 0.000680ꜩ |
Assign item to user | 0.021997ꜩ |
Update instance | 0.009729ꜩ |
transfer instance to new user | 0.000703ꜩ |
action | cost |
---|---|
warehouse origination | 0.566903ꜩ |
create warehouse item | 0.031202ꜩ |
Update same size warehouse item | 0.000729ꜩ |
Update smaller size warehouse item | 0.000703ꜩ |
Update bigger size warehouse item | 0.017045ꜩ |
Freeze item | 0.000675ꜩ |
Assign item to user | 0.021992ꜩ |
Update instance | 0.009724ꜩ |
transfer instance to new user | 0.000698ꜩ |
action | cost |
---|---|
warehouse origination | 0.57152ꜩ |
create warehouse item | 0.032072ꜩ |
Update same size warehouse item | 0.001618ꜩ |
Update smaller size warehouse item | 0.001588ꜩ |
Update bigger size warehouse item | 0.017936ꜩ |
Freeze item | 0.001552ꜩ |
Assign item to user | 0.022876ꜩ |
Update instance | 0.010594ꜩ |
transfer instance to new user | 0.001568ꜩ |
action | cost |
---|---|
warehouse origination | 0.451211ꜩ |
inventory origination | 0.386428ꜩ |
create warehouse item | 0.031179ꜩ |
Update same size warehouse item | 0.000706ꜩ |
Update smaller size warehouse item | 0.00068ꜩ |
Update bigger size warehouse item | 0.017023ꜩ |
Transfer item to inventory | 0.020832ꜩ |
action | cost |
---|---|
warehouse origination | 0.451804ꜩ |
inventory origination | 0.386914ꜩ |
create warehouse item | 0.03179ꜩ |
Update same size warehouse item | 0.001335ꜩ |
Update smaller size warehouse item | 0.001305ꜩ |
Update bigger size warehouse item | 0.017653ꜩ |
Transfer item to inventory | 0.022413ꜩ |
0.2.0
FAQs
Tokenization Service's Smart Contracts
The npm package @jwalab/tokenization-service-contracts receives a total of 5 weekly downloads. As such, @jwalab/tokenization-service-contracts popularity was classified as not popular.
We found that @jwalab/tokenization-service-contracts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.