Skip to content

Commit

Permalink
further clarification -> bech32-encoded 'sei*' address
Browse files Browse the repository at this point in the history
  • Loading branch information
dssei committed Apr 12, 2024
1 parent 9eebf58 commit 8f5f9e5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
42 changes: 21 additions & 21 deletions packages/sei-cosmwasm/src/querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ impl<'a> SeiQuerier<'a> {
}

/// Calls the EVM contract deployed at the `to` address with the given `data`.
/// The from address is the caller's Sei native address.
/// The from address is the caller's Sei native (bech32-encoded 'sei*') address.
/// Please note that the CW contract has to be in the allow list in order to execute a delegate
/// call.
///
/// The EVM (Solidity) contract `msg.sender` in this case will be the caller's address.
///
/// # Arguments
/// * `from` - Sei native address of the caller.
/// * `from` - Sei native (bech32-encoded 'sei*') address of the caller.
/// * `to` - The address of the EVM contract to call.
/// * `data` - Base64 encoded data to pass to the contract.
///
Expand Down Expand Up @@ -209,7 +209,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get hex payload for the ERC-20 `transfer` function
///
/// # Arguments
/// * `recipient` - Recipient Sei native address.
/// * `recipient` - Recipient Sei native (bech32-encoded 'sei*') address.
/// * `amount` - The amount to transfer.
///
/// # Returns
Expand All @@ -236,8 +236,8 @@ impl<'a> SeiQuerier<'a> {
/// Query to get hex payload for the ERC-20 `transferFrom` function
///
/// # Arguments
/// * `owner` - Owner Sei native address.
/// * `recipient` - Recipient Sei native address.
/// * `owner` - Owner Sei native (bech32-encoded 'sei*') address.
/// * `recipient` - Recipient Sei native (bech32-encoded 'sei*') address.
/// * `amount` - The amount to transfer.
///
/// # Returns
Expand Down Expand Up @@ -269,7 +269,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get hex payload for the ERC-20 `approve` function
///
/// # Arguments
/// * `spender` - Spender Sei native address.
/// * `spender` - Spender Sei native (bech32-encoded 'sei*') address.
/// * `amount` - The amount to approve.
///
/// # Returns
Expand Down Expand Up @@ -297,8 +297,8 @@ impl<'a> SeiQuerier<'a> {
///
/// # Arguments
/// * `contract_address` - The contract address of the ERC-20 token.
/// * `owner` - Owner Sei native address.
/// * `spender` - Spender Sei native address.
/// * `owner` - Owner Sei native (bech32-encoded 'sei*') address.
/// * `spender` - Spender Sei native (bech32-encoded 'sei*') address.
///
/// # Returns
/// * `StdResult<Erc20AllowanceResponse>` - A standard result that wraps the
Expand Down Expand Up @@ -330,7 +330,7 @@ impl<'a> SeiQuerier<'a> {
///
/// # Arguments
/// * `contract_address` - The contract address of the ERC-20 token.
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
///
/// # Returns
/// * `StdResult<TokenInfoResponse>` - A standard result that wraps the `TokenInfoResponse`.
Expand Down Expand Up @@ -359,7 +359,7 @@ impl<'a> SeiQuerier<'a> {
///
/// # Arguments
/// * `contract_address` - The contract address of the ERC-20 token.
/// * `account` - Sei native account address.
/// * `account` - Sei native (bech32-encoded 'sei*') account address.
///
/// # Returns
/// * `StdResult<BalanceResponse>` - A standard result that wraps the `BalanceResponse`.
Expand Down Expand Up @@ -387,7 +387,7 @@ impl<'a> SeiQuerier<'a> {
/// Executes ERC-721 `ownerOf` function under the hood.
///
/// # Arguments
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
/// * `contract_address` - The contract address of the ERC-721 token.
/// * `token_id` - The identifier for an NFT. String representation of the token ID.
///
Expand Down Expand Up @@ -418,7 +418,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get the approved address for a single NFT. Executes ERC-721 `getApproved` function.
///
/// # Arguments
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
/// * `contract_address` - The contract address of the ERC-721 token.
/// * `token_id` - The identifier for an NFT. String representation of the token ID.
///
Expand Down Expand Up @@ -451,9 +451,9 @@ impl<'a> SeiQuerier<'a> {
/// `isApprovedForAll` function.
///
/// # Arguments
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
/// * `contract_address` - The contract address of the ERC-721 token.
/// * `owner` - The owner of the NFT Sei native address
/// * `owner` - The owner of the NFT Sei native (bech32-encoded 'sei*') address
/// * `operator` - The operator Sei address that acts on behalf of the owner
///
/// # Returns
Expand Down Expand Up @@ -487,7 +487,7 @@ impl<'a> SeiQuerier<'a> {
/// `symbol` functions under the hood.
///
/// # Arguments
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
/// * `contract_address` - The contract address of the ERC-721 token.
///
/// # Returns
Expand Down Expand Up @@ -516,7 +516,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get the URI for a given NFT. Executes ERC-721 `tokenURI` function under the hood.
///
/// # Arguments
/// * `caller` - Caller Sei native address.
/// * `caller` - Caller Sei native (bech32-encoded 'sei*') address.
/// * `contract_address` - The contract address of the ERC-721 token.
/// * `token_id` - The identifier for an NFT. String representation of the token ID.
///
Expand Down Expand Up @@ -547,8 +547,8 @@ impl<'a> SeiQuerier<'a> {
/// Query to get the hex payload for the ERC-721 `transferFrom` function
///
/// # Arguments
/// * `from` - Sender Sei native address.
/// * `recipient` - Recipient Sei native address.
/// * `from` - Sender Sei native (bech32-encoded 'sei*') address.
/// * `recipient` - Recipient Sei native (bech32-encoded 'sei*') address.
/// * `token_id` - The identifier for an NFT. String representation of the token ID.
///
/// # Returns
Expand Down Expand Up @@ -579,7 +579,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get the hex payload for the ERC-721 `approve` function
///
/// # Arguments
/// * `spender` - Spender Sei native address.
/// * `spender` - Spender Sei native (bech32-encoded 'sei*') address.
/// * `token_id` - The identifier for an NFT. String representation of the token ID.
///
/// # Returns
Expand All @@ -605,7 +605,7 @@ impl<'a> SeiQuerier<'a> {
/// Query to get the hex payload for the ERC-721 `setApprovalForAll` function.
///
/// # Arguments
/// * `to` - Sei native address of the operator
/// * `to` - Sei native (bech32-encoded 'sei*') address of the operator
/// * `approved` - Boolean representing the status to set
///
/// # Returns
Expand Down Expand Up @@ -637,7 +637,7 @@ impl<'a> SeiQuerier<'a> {
///
/// # Arguments
///
/// * `sei_address` - A `String` that represents the Sei native address.
/// * `sei_address` - A `String` that represents the Sei native (bech32-encoded 'sei*') address.
///
/// # Returns
///
Expand Down
54 changes: 27 additions & 27 deletions packages/sei-cosmwasm/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub enum SeiQuery {
/// StaticCall executes the contract associated deployed at `to` address with the given `data`
/// as parameters while disallowing any modifications to the state during the call.
StaticCall {
/// Sei native address calling the contract
/// Sei native (bech32-encoded 'sei*') address calling the contract
from: String,
/// The address of the EVM contract to call
to: String,
Expand All @@ -70,23 +70,23 @@ pub enum SeiQuery {
},
/// Query to get hex payload for the ERC-20 `transfer` function
Erc20TransferPayload {
/// Recipient Sei native address
/// Recipient Sei native (bech32-encoded 'sei*') address
recipient: String,
/// Amount to transfer
amount: Uint128,
},
/// Query to get hex payload for the ERC-20 `transferFrom` function
Erc20TransferFromPayload {
/// Owner Sei native address
/// Owner Sei native (bech32-encoded 'sei*') address
owner: String,
/// Recipient Sei native address
/// Recipient Sei native (bech32-encoded 'sei*') address
recipient: String,
/// Amount to transfer
amount: Uint128,
},
/// Query to get hex payload for the ERC-20 `approve` function
Erc20ApprovePayload {
/// Spender Sei native address
/// Spender Sei native (bech32-encoded 'sei*') address
spender: String,
/// Amount to approve
amount: Uint128,
Expand All @@ -96,46 +96,46 @@ pub enum SeiQuery {
Erc20Allowance {
/// ERC-20 contract address
contract_address: String,
/// Owner Sei native address
/// Owner Sei native (bech32-encoded 'sei*') address
owner: String,
/// Spender Sei native address
/// Spender Sei native (bech32-encoded 'sei*') address
spender: String,
},
/// Query to get the token info, including the name, symbol, decimals and total supply
Erc20TokenInfo {
/// ERC-20 contract address
contract_address: String,
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
},
/// Query to get the balance of the account with the given Sei native address.
/// Query to get the balance of the account with the given Sei native (bech32-encoded 'sei*') address.
/// Executes the `balanceOf` ERC-20 function under the hood.
Erc20Balance {
/// ERC-20 contract address
contract_address: String,
/// Account Sei native address
/// Account Sei native (bech32-encoded 'sei*') address
account: String,
},
/// Query to get the hex payload for the ERC-721 `transferFrom` function
Erc721TransferPayload {
/// Sei native address of the sender
/// Sei native (bech32-encoded 'sei*') address of the sender
from: String,
/// Sei native address of the recipient
/// Sei native (bech32-encoded 'sei*') address of the recipient
recipient: String,
/// The identifier for an NFT. String representation of the token ID
token_id: String,
},
/// Query to get the hex payload for the ERC-721 `approve` function
Erc721ApprovePayload {
/// Sei native address of the spender
/// Sei native (bech32-encoded 'sei*') address of the spender
spender: String,
/// The identifier for an NFT. String representation of the token ID
token_id: String,
},
/// Query to get the Sei native address of the owner of the NFT.
/// Query to get the Sei native (bech32-encoded 'sei*') address of the owner of the NFT.
/// Executes ERC-721 `ownerOf` function under the hood.
Erc721Owner {
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
/// ERC-721 contract address
contract_address: String,
Expand All @@ -144,7 +144,7 @@ pub enum SeiQuery {
},
/// Query to get the approved address for a single NFT. Executes ERC-721 `getApproved` function
Erc721Approved {
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
/// ERC-721 contract address
contract_address: String,
Expand All @@ -154,33 +154,33 @@ pub enum SeiQuery {
/// Query if an address is an authorized operator for another address. Executes ERC-721
/// `isApprovedForAll` function.
Erc721IsApprovedForAll {
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
/// ERC-721 contract address
contract_address: String,
/// The owner of the NFT Sei native address
/// The owner of the NFT Sei native (bech32-encoded 'sei*') address
owner: String,
/// The operator Sei address that acts on behalf of the owner
operator: String,
},
/// Query to get the hex payload for the ERC-721 `setApprovalForAll` function.
Erc721SetApprovalAllPayload {
/// Sei native address of the operator
/// Sei native (bech32-encoded 'sei*') address of the operator
to: String,
/// Boolean representing the status to set
approved: bool,
},
/// Query to get the name and symbol of the ERC-721 contract. Executes ERC-721 `name` and
/// `symbol` functions under the hood.
Erc721NameSymbol {
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
/// ERC-721 contract address
contract_address: String,
},
/// Query to get the URI for a given NFT. Executes ERC-721 `tokenURI` function under the hood.
Erc721Uri {
/// Caller Sei native address
/// Caller Sei native (bech32-encoded 'sei*') address
caller: String,
/// ERC-721 contract address
contract_address: String,
Expand Down Expand Up @@ -291,11 +291,11 @@ pub struct Erc20AllowanceResponse {
pub allowance: Uint128,
}

/// `Erc721OwnerResponse` is a struct that represents a response containing the Sei native address
/// `Erc721OwnerResponse` is a struct that represents a response containing the Sei native (bech32-encoded 'sei*') address
/// of the owner.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Erc721OwnerResponse {
/// The Sei native address of the owner of the NFT
/// The Sei native (bech32-encoded 'sei*') address of the owner of the NFT
pub owner: String,
}

Expand Down Expand Up @@ -337,7 +337,7 @@ pub struct Erc721UriResponse {
pub struct EvmAddressResponse {
/// The 20-byte EVM address associated to Sei address that's derived from the public part of a
/// public-private key pair. It's represented as a hex string.
/// Address is empty if the Sei native address is not associated with any EVM address.
/// Address is empty if the Sei native (bech32-encoded 'sei*') address is not associated with any EVM address.
pub evm_address: String,

/// A boolean value indicating whether the EVM address is associated.
Expand All @@ -347,10 +347,10 @@ pub struct EvmAddressResponse {
/// `SeiAddressResponse` is a struct that represents a response containing a SEI address.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct SeiAddressResponse {
/// The SEI native address associated to EVM address. Empty if the EVM address is
/// not associated with any SEI native address.
/// The Sei native (bech32-encoded 'sei*') address associated to EVM address. Empty if the EVM address is
/// not associated with any Sei native (bech32-encoded 'sei*') address.
pub sei_address: String,

/// A boolean value indicating whether the SEI native address is associated to EVM address.
/// A boolean value indicating whether the Sei native (bech32-encoded 'sei*') address is associated to EVM address.
pub associated: bool,
}

0 comments on commit 8f5f9e5

Please sign in to comment.