Skip to content

Latest commit

 

History

History

factory

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Auction Factory

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.

How to Build Locally?

Install the NEAR CLI and run:

Install the dependencies:

npm install

Build the contract:

npm run build

How to Test Locally?

npm run test

How to Deploy?

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