Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update usages of cargo-near #2392

Merged
merged 3 commits into from
Jan 4, 2025
Merged

Conversation

dj8yfo
Copy link
Contributor

@dj8yfo dj8yfo commented Dec 23, 2024

follow-up on near/cargo-near#262 in the spirit of #2390

@dj8yfo dj8yfo requested a review from bucanero as a code owner December 23, 2024 16:05
@@ -435,6 +435,6 @@ At the time of this writing, this example works with the following versions:
- node: `20.18.0`
- rustc: `1.81.0`
- near-cli-rs: `0.15.1`
- cargo-near: `0.10.1`
- cargo-near: `0.13.2`
Copy link
Contributor Author

@dj8yfo dj8yfo Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes in https://github.com/near/docs/pull/2390/files were somewhat inconsistent, by suggesting to use interactive variant, but not changing cmd version

@@ -71,7 +71,7 @@ On initialization you will define the token's metadata such as its name (e.g. Et
To initialize a FT contract you will need to deploy it and then call the `new` method defining the token's metadata.

```bash
cargo near deploy <account-id> with-init-call new json-args '{"owner_id": "<owner-account>", "total_supply": "1000000000000000", "metadata": { "spec": "ft-1.0.0", "name": "Example Token Name", "symbol": "EXLT", "decimals": 8 }}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send
cargo near deploy build-non-reproducible-wasm <account-id> with-init-call new json-args '{"owner_id": "<owner-account>", "total_supply": "1000000000000000", "metadata": { "spec": "ft-1.0.0", "name": "Example Token Name", "symbol": "EXLT", "decimals": 8 }}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send
Copy link
Contributor Author

@dj8yfo dj8yfo Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all cargo near deploy cmds were changed to variant explicitly specified, as all of them were specified with all of the rest of the arguments

@@ -290,9 +290,7 @@ In order to deploy the contract you will need to create a NEAR account.
Go into the directory containing the smart contract (`cd contract-advanced-ts` or `cd contract-advanced-rs`), build and deploy it:

```bash
cargo near build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's somewhat pointless to do cargo near build in the same sequence with cargo near deploy, as the latter will do a build step anyway

@@ -42,7 +42,7 @@ Let's start by building both the finished FT contract and the marketplace contra


```bash
cd market-contract && cargo near build && cd ..
cd market-contract && cargo near build non-reproducible-wasm && cd ..
Copy link
Contributor Author

@dj8yfo dj8yfo Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in such occurencies where full command is required as part of a script, non-reproducible-wasm variant token was added to prevent prompts popping up to user,

it other places having only cargo near build prefix is still correct, as 2 choices will be suggested in interactive menu

@gagdiez gagdiez merged commit 5b784a4 into near:master Jan 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Shipped 🚀
Development

Successfully merging this pull request may close these issues.

2 participants