FungibleTokenBidContract
Class: FungibleTokenBidContract
Properties overview
- buyer: State; ↗
- events: {
bid: typeof BidEvent;
sell: typeof BidEvent;
updateWhitelist: typeof Whitelist;
withdraw: typeof BidEvent;
}; ↗ - bid: typeof BidEvent = BidEvent; ↗
- sell: typeof BidEvent = BidEvent; ↗
- updateWhitelist: typeof Whitelist = Whitelist; ↗
- withdraw: typeof BidEvent = BidEvent; ↗
- Overrides: SmartContract.events ↗
- price: State; ↗
- token: State; ↗
- whitelist: State; ↗
- Overrides: SmartContract.deploy ↗
Methods overview
Defined in: packages/token/src/bid.ts:29
Extends
SmartContract
Constructors
new FungibleTokenBidContract()
new FungibleTokenBidContract(address: PublicKey, tokenId?: Field): FungibleTokenBidContract
Defined in: node_modules/o1js/dist/node/lib/mina/zkapp.d.ts:148
Parameters
address
PublicKey
tokenId?
Field
Returns
Inherited from
SmartContract.constructor
Properties
buyer
buyer: State<PublicKey>;
Defined in: packages/token/src/bid.ts:31
events
events: {
bid: typeof BidEvent;
sell: typeof BidEvent;
updateWhitelist: typeof Whitelist;
withdraw: typeof BidEvent;
};
Defined in: packages/token/src/bid.ts:47
A list of event types that can be emitted using this.emitEvent()`.
bid
bid: typeof BidEvent = BidEvent;
sell
sell: typeof BidEvent = BidEvent;
updateWhitelist
updateWhitelist: typeof Whitelist = Whitelist;
withdraw
withdraw: typeof BidEvent = BidEvent;
Overrides
SmartContract.events
price
price: State<UInt64>;
Defined in: packages/token/src/bid.ts:30
token
token: State<PublicKey>;
Defined in: packages/token/src/bid.ts:32
whitelist
whitelist: State<Whitelist>;
Defined in: packages/token/src/bid.ts:33
Methods
bid()
bid(amount: UInt64, price: UInt64): Promise<void>
Defined in: packages/token/src/bid.ts:78
Parameters
amount
UInt64
price
UInt64
Returns
Promise
<void
>
deploy()
deploy(args: FungibleTokenBidContractDeployProps): Promise<void>
Defined in: packages/token/src/bid.ts:35
Deploys a SmartContract.
let tx = await Mina.transaction(sender, async () => {
AccountUpdate.fundNewAccount(sender);
await zkapp.deploy();
});
tx.sign([senderKey, zkAppKey]);
Parameters
args
FungibleTokenBidContractDeployProps
Returns
Promise
<void
>
Overrides
SmartContract.deploy
initialize()
initialize(
token: PublicKey,
amount: UInt64,
price: UInt64): Promise<void>
Defined in: packages/token/src/bid.ts:54
Parameters
token
PublicKey
amount
UInt64
price
UInt64
Returns
Promise
<void
>
sell()
sell(amount: UInt64): Promise<void>
Defined in: packages/token/src/bid.ts:128
Parameters
amount
UInt64
Returns
Promise
<void
>
updateWhitelist()
updateWhitelist(whitelist: Whitelist): Promise<void>
Defined in: packages/token/src/bid.ts:160
Parameters
whitelist
Whitelist
Returns
Promise
<void
>
withdraw()
withdraw(amountInMina: UInt64): Promise<void>
Defined in: packages/token/src/bid.ts:110
Parameters
amountInMina
UInt64
Returns
Promise
<void
>
Updated 10 days ago