| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Classes for managing Scilla smart contracts on the Zilliqa blockchain.
interface DeployParams {
gasPrice: BN;
gasLimit: Long;
nonce?: number;
pubKey?: string;
}
interface CallParams {
amount: BN;
gasPrice: BN;
gasLimit: Long;
nonce?: number;
pubKey?: string;
}
interface Field {
name: string;
type: string;
}
interface Transition {
name: string;
params: Field[];
}
interface ABI {
name: string;
fields: Field[];
params: Field[];
transitions: Transition[];
}
interface Value {
vname: string;
type: string;
value: string;
}
type Init = Value[];
type State = any;A factory class for creating Contract instances. Useful for managing Provider instances set on Contracts. The factory is mainly used by the top-level module exported by @zilliqa-js/zilliqa.
Parameters
Returns
Computes the address for a contract deployment by concatenating senderAddress and nonce and hasing the resulting bytes. Note that this method will not compute an accurate address if the provided nonce is not up to date with the actual nonce on the blockchain.
Parameters
Returns
Constructs a Contract with the provided parameters. It is recommended that this method by used only to construct contracts that have already been deployed.
Parameters
Returns
Constructs a Contract with the provided parameters, that is not deployed. The contract may subsequently be deployed.
Parameters
Returns
A class representing a single smart contract. Allows for deployment and calling the smart contract's transitions.
Parameters
Returns
factory: Contracts provider: Provider signer: Wallet
init: Init abi?: ABI (Optional) state?: State (Optional) address?: string (Optional) code?: string (Optional) status: ContractStatus
Returns true if no attempt has been made to deploy the Contract, or its status is unknown.
Returns
Returns true if the contract has been successfully deployed.
Returns
Returns true if the contract deployment attempt was rejected by the network.
Returns
Deploys a contract to the blockchain. This method will automatically generate and sign the underlying Transaction and broadcast it. The status of the Contract may then be ascertained by using isRejected or isDeployed, once the Promise resolves.
This API is unstable and subject to breaking changes pre-main net
Parameters
Returns
Calls a transition of the current contract. At the moment, this is a low-level interface for interacting with simple smart contracts.
This API is unstable and subject to breaking changes pre-main net
Parameters
Returns
Queries the blockchain for the smart contract's state. Note that this method will return the entire state of the smart contract. As a result, if you have a large amount of data stored in a smart contract do not use this method on a client. Instead, use a server-side layer to cache and proxy such queries.
Parameters
None
Returns
Queries the blockchain for the smart contract's init (a.k.a. immutable variables of a contract)
Parameters
None
Returns
Queries the contract state, filtered by the variable names. This function is the filtered version of getState. As getSubState performs the filtering, variableName of a field is required.
If the subState is not found, this returns a null response.
Parameters
Returns
| Back | FazBrowse Home | New Git URL |