-
Notifications
You must be signed in to change notification settings - Fork 376
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all |
||
``` | ||
|
||
:::tip | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's somewhat pointless to do |
||
|
||
cargo near deploy <accountId> with-init-call new json-args '{"hello_account":"hello.near-example.testnet","guestbook_account":"guestbook_account.near-example.testnet","counter_account":"counter_account.near-example.testnet"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send | ||
cargo near deploy build-non-reproducible-wasm <accountId> with-init-call new json-args '{"hello_account":"hello.near-example.testnet","guestbook_account":"guestbook_account.near-example.testnet","counter_account":"counter_account.near-example.testnet"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send | ||
``` | ||
|
||
<hr class="subsection" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 .. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, it other places having only |
||
``` | ||
|
||
This will install the dependencies for the marketplace contract as well as the FT contract. Note that there's also `ft-tutorial/out` directory with pre-build nft contract wasm file which you'll use to place the NFTs for sale. | ||
|
@@ -174,15 +174,15 @@ Now that you *hopefully* have a good understanding of how the marketplace contra | |
The first thing you'll want to do is deploy a new FT, NFT, and marketplace contract. | ||
|
||
```bash | ||
cd market-contract && cargo near build && cd .. | ||
cd market-contract && cargo near build non-reproducible-wasm && cd .. | ||
``` | ||
|
||
To deploy the FT contract and export an environment variable, run the following command: | ||
|
||
```bash | ||
export FT_CONTRACT=<new-ft-account-id> | ||
near create-account $FT_CONTRACT --useFaucet | ||
cd 5.transfers/ && cargo near deploy $FT_CONTRACT with-init-call new_default_meta json-args '{"owner_id": "'$FT_CONTRACT'", "total_supply": "1000000000000000000000000000"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send && cd ../ | ||
cd 5.transfers/ && cargo near deploy build-non-reproducible-wasm $FT_CONTRACT with-init-call new_default_meta json-args '{"owner_id": "'$FT_CONTRACT'", "total_supply": "1000000000000000000000000000"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send && cd ../ | ||
``` | ||
|
||
Next, you'll deploy the NFT and marketplace contracts. | ||
|
@@ -196,7 +196,7 @@ near deploy $NFT_CONTRACT out/nft-contract.wasm | |
```bash | ||
export MARKETPLACE_CONTRACT=<new-marketplace-account-id> | ||
near create-account $MARKETPLACE_CONTRACT --useFaucet | ||
cd market-contract/ && cargo near deploy $MARKETPLACE_CONTRACT with-init-call new json-args '{"owner_id": "'$MARKETPLACE_CONTRACT'", "ft_id": "'$FT_CONTRACT'"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send && cd ../ | ||
cd market-contract/ && cargo near deploy build-non-reproducible-wasm $MARKETPLACE_CONTRACT with-init-call new json-args '{"owner_id": "'$MARKETPLACE_CONTRACT'", "ft_id": "'$FT_CONTRACT'"}' prepaid-gas '100.0 Tgas' attached-deposit '0 NEAR' network-config testnet sign-with-keychain send && cd ../ | ||
``` | ||
|
||
Check and see if your environment variables are all correct by running the following command. Each output should be different. | ||
|
@@ -613,6 +613,6 @@ At the time of this writing, this example works with the following versions: | |
|
||
- rustc: `1.77.1` | ||
- near-sdk-rs: `5.1.0` (with enabled `legacy` feature) | ||
- cargo-near: `0.6.1` | ||
- cargo-near: `0.13.2` | ||
- near-cli: `4.0.13` | ||
::: |
There was a problem hiding this comment.
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