This directory contains a factory contract, written in Rust, that is used to deploy new auctions and initialize them. It follows the Auction Factory section of the auction tutorial.
Install the NEAR CLI and run:
Install the dependencies:
npm install
Build the contract:
npm run build
npm run test
Install the NEAR CLI and run:
# Create a new account
near create <contractId> --useFaucet
# Deploy the contract
near deploy <contractId> ./build/auction.wasm
# Create a new auction
TWO_MINUTES_FROM_NOW=$(date -v+2M +%s000000000)
near call <contractId> deploy_new_auction '{"name": "<auctionName>", "end_time": '$TWO_MINUTES_FROM_NOW', "auctioneer": "<auctioneerAccountId>>", "ft_contract": "<nftContractId>", "nft_contract": "<nftContractId>", "token_id": "tokenId", "starting_price": "<startingPrice>"}' --accountId <accountId> --deposit 1.6 --gas 100000000000000