Skip to content

Commit

Permalink
Merge pull request #2863 from iron-fish/staging
Browse files Browse the repository at this point in the history
STAGING -> MASTER
  • Loading branch information
NullSoldier authored Jan 9, 2023
2 parents efc3bc6 + 748c927 commit 7886c32
Show file tree
Hide file tree
Showing 47 changed files with 2,299 additions and 2,067 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish_rust --release --out Xml --avoid-cfg-tarpaulin --skip-clean -- --test-threads 1
cargo tarpaulin -p ironfish_rust --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 180 -- --test-threads 1
# Upload code coverage to Codecov
- name: Upload to codecov.io
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish_zkp --release --out Xml --avoid-cfg-tarpaulin --skip-clean -- --test-threads 1
cargo tarpaulin -p ironfish_zkp --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 180 -- --test-threads 1
# Upload code coverage to Codecov
- name: Upload to codecov.io
Expand Down
6 changes: 3 additions & 3 deletions ironfish-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ironfish",
"version": "0.1.56",
"version": "0.1.57",
"description": "CLI for running and interacting with an Iron Fish node",
"author": "Iron Fish <[email protected]> (https://ironfish.network)",
"main": "build/src/index.js",
Expand Down Expand Up @@ -57,8 +57,8 @@
"dependencies": {
"@aws-sdk/client-cognito-identity": "3.215.0",
"@aws-sdk/client-s3": "3.127.0",
"@ironfish/rust-nodejs": "0.1.19",
"@ironfish/sdk": "0.0.33",
"@ironfish/rust-nodejs": "0.1.20",
"@ironfish/sdk": "0.0.34",
"@oclif/core": "1.23.1",
"@oclif/plugin-help": "5.1.12",
"@oclif/plugin-not-found": "2.3.1",
Expand Down
1 change: 0 additions & 1 deletion ironfish-cli/src/commands/chain/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default class Asset extends IronfishCommand {
this.log(`Metadata: ${BufferUtils.toHuman(Buffer.from(data.content.metadata, 'hex'))}`)
this.log(`Owner: ${data.content.owner}`)
this.log(`Supply: ${data.content.supply}`)
this.log(`Nonce: ${data.content.nonce}`)
this.log(`Identifier: ${data.content.id}`)
this.log(`Transaction Created: ${data.content.createdTransactionHash}`)
}
Expand Down
34 changes: 16 additions & 18 deletions ironfish-cli/src/commands/wallet/mint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,25 @@ export class Mint extends IronfishCommand {
description: 'Amount of coins to mint',
required: true,
}),
assetId: Flags.string({
char: 'i',
description: 'Identifier for the asset',
required: false,
}),
metadata: Flags.string({
char: 'm',
description: 'Metadata for the asset',
required: true,
required: false,
}),
name: Flags.string({
char: 'n',
description: 'Name for the asset',
required: true,
required: false,
}),
}

async start(): Promise<void> {
const { flags } = await this.parse(Mint)
// TODO(mgeist,rohanjadvani):
// These fields will be required for now. They will be made optional when
// this CLI command is refactored to also accept an asset identifier
const account = flags.account
const fee = flags.fee
const metadata = flags.metadata
const name = flags.name
const amount = flags.amount
const client = await this.sdk.connectRpc(false, true)

const status = await client.getNodeStatus()
Expand Down Expand Up @@ -88,23 +85,24 @@ export class Mint extends IronfishCommand {

try {
const result = await client.mintAsset({
account,
fee,
metadata,
name,
value: amount,
account: flags.account,
assetId: flags.assetId,
fee: flags.fee,
metadata: flags.metadata,
name: flags.name,
value: flags.amount,
})

stopProgressBar()

const response = result.content
this.log(`
Minted asset ${name} from ${account}
Minted asset ${response.name} from ${flags.account}
Asset Identifier: ${response.assetId}
Value: ${amount}
Value: ${response.value}
Transaction Hash: ${response.hash}
Transaction fee: ${CurrencyUtils.renderIron(fee, true)}
Transaction fee: ${CurrencyUtils.renderIron(flags.fee, true)}
Find the transaction on https://explorer.ironfish.network/transaction/${
response.hash
Expand Down
1 change: 0 additions & 1 deletion ironfish-rust-nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export class Asset {
constructor(ownerPrivateKey: string, name: string, metadata: string)
metadata(): Buffer
name(): Buffer
nonce(): number
owner(): Buffer
static nativeId(): Buffer
id(): Buffer
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-darwin-arm64",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-darwin-x64",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-arm64-gnu",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-arm64-musl",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-x64-gnu",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-linux-x64-musl",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs-win32-x64-msvc",
"version": "0.1.19",
"version": "0.1.20",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion ironfish-rust-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ironfish/rust-nodejs",
"version": "0.1.19",
"version": "0.1.20",
"description": "Node.js bindings for Rust code required by the Iron Fish SDK",
"main": "index.js",
"types": "index.d.ts",
Expand Down
5 changes: 0 additions & 5 deletions ironfish-rust-nodejs/src/structs/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ impl NativeAsset {
Buffer::from(self.asset.name())
}

#[napi]
pub fn nonce(&self) -> u32 {
*self.asset.nonce() as u32
}

#[napi]
pub fn owner(&self) -> Buffer {
Buffer::from(&self.asset.owner()[..])
Expand Down
Loading

0 comments on commit 7886c32

Please sign in to comment.