pub struct Port {
pub application: <<ILOCKmvp as ContractEnv>::Env as Environment>::Hash,
pub tax: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance,
pub cap: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance,
pub locked: bool,
pub paid: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance,
pub collected: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance,
pub owner: <<ILOCKmvp as ContractEnv>::Env as Environment>::AccountId,
}
Expand description
- Information pertaining to port definition in application/socket/port contract connectivity formalism.
Fields§
§application: <<ILOCKmvp as ContractEnv>::Env as Environment>::Hash
- What is the codehash of the application smart contract associated with this port?
- This codehash is the application template that numerous individual application contracts may be instantiated and connected to this PSP22 contract via socket without signed permission from this ILOCK contract’s owner.
- This codehash is essential to making sure that only safe and approved application contracts are able to connect to this token contract and manipulate its owneronly functionalities (as defined per respective port protocol).
tax: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance
- How much does Interlock tax transaction taking place within a port protocol’s socket call?
cap: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance
- For withdrawing rewards from ILOCK rewards pool, what is the max this particular port owner’s application type can withdraw from rewards pool?
locked: bool
- If locked, only Interlock token contract owner can create a socket connection with this token contract using the appropriate application codehash.
paid: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance
- How much ILOCK has this port been rewarded or issued throughout the course of its operation (in case where protocol rewards or issues ILOCK, that is)?
collected: <<ILOCKmvp as ContractEnv>::Env as Environment>::Balance
- How much has Interlock collected from this port in taxes or other collections?
owner: <<ILOCKmvp as ContractEnv>::Env as Environment>::AccountId
- Who is the overall owner of this port?
- Socket operators are not necessarily owners of the port.
- For example, a restaurant franchise has one owner, whereas the franchise may have numberous restaurant locations, each with it’s own operator, each operator/franchise pair forming a separate socket connection.
Trait Implementations§
source§impl Decode for Port
impl Decode for Port
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
source§impl Default for Port
impl Default for Port
- Ink 4 has no AccountId Default impl thus struct Default cannot be derived
due to
owner
field. - Default derivation is required by openbrush contract implementation of contract storage.
source§impl Encode for Port
impl Encode for Port
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl PartialEq<Port> for Port
impl PartialEq<Port> for Port
impl EncodeLike<Port> for Port
impl Eq for Port
impl StructuralEq for Port
impl StructuralPartialEq for Port
Auto Trait Implementations§
impl RefUnwindSafe for Port
impl Send for Port
impl Sync for Port
impl Unpin for Port
impl UnwindSafe for Port
Blanket Implementations§
§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere T: Decode,
§impl<T> Flush for Twhere
T: Storable + StorageKey,
impl<T> Flush for Twhere T: Storable + StorageKey,
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
§impl<P> Storable for Pwhere
P: Codec,
impl<P> Storable for Pwhere P: Codec,
§impl<P, Key> StorableHint<Key> for Pwhere
P: Packed,
Key: StorageKey,
impl<P, Key> StorableHint<Key> for Pwhere P: Packed, Key: StorageKey,
§type PreferredKey = AutoKey
type PreferredKey = AutoKey
The storage key that the type prefers. It can be overwritten by an auto-generated storage key.