Forge Contract Queries
Table of contents
Token Info:
Gets the information about the token stored on the blockchain
{token_info: {}}
{"token_info": {}}
{
"name": "Y-Foundry-Forge",
"symbol": "fYFD",
"decimals": 6,
"total_supply": "26788035103"
}
Download Logo:
Downloads the on-chain logo for the fYFD token if there is one
{download_logo:{}}
{"download_logo":{}}
logo not found: query wasm contract failed: invalid request
Marketing Info:
Gets the on-chain marketing information for the fYFD token
{marketing_info:{}}
{"marketing_info":{}}
{
"project": null,
"description": null,
"logo": null,
"marketing": null
}
All Accounts:
Gets all wallet addressess that hold fYFD
{all_accounts:{}}
{"all_accounts":{}}
{"accounts":["address", "address", "address", ...]}
Balance:
Gets the fYFD balance of the given wallet address. Balance is returned in microunits
{balance: { address: [account_address]}}
{"balance": { "address": "[account_address]"}}
{"balance": "78999989667"}
Balance Detail:
Gets the fYFD balance details of the given wallet address. This gives more information than the balance query
{balance_detail: { address: [account_address]}}
{"balance_detail": { "address": "[account_address]"}}
{
"balance": "26787919520",
"stakes": [
{
"idx": "1",
"stake": {
"depositor": "terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk",
"asset_deposit_amount": "10000000000",
"asset_withdrawn_amount": "0",
"deposit_timestamp": "1667357614729457660",
"deposit_height": 2519009,
"lock_duration": 10512000
}
},
{
"idx": "2",
"stake": {
"depositor": "terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk",
"asset_deposit_amount": "800000000",
"asset_withdrawn_amount": "0",
"deposit_timestamp": "1667372302575186535",
"deposit_height": 2521682,
"lock_duration": 10512000
}
}
]
}
All Proposals:
Gets a list of all governance proposals on the forge contract
{all_proposals:{}}
{"all_proposals":{}}
{
"proposals": [
{
"addr": "terra1xl2jwtqc0whwulhsew5728fcl0v5d0yq0r7clhalp2aaap6dmjqs3jf7k8",
"index": "1"
},
{
"addr": "terra180d496dk3krrqx66mp047uue2sexwmc6356v4e0rtl2fj6rc67cq867u4f",
"index": "2"
}
]
}
Proposal:
Gets details about a proposal in the list
{proposal:{idx:"1"}}
{"proposal":{"idx":"1"}}
{
"name": "YFD Governance Proposal AAAB",
"closing_block": 2619871,
"quorum_block": 2519140,
"state": {
"Affirm": {}
},
"addr": "terra1xl2jwtqc0whwulhsew5728fcl0v5d0yq0r7clhalp2aaap6dmjqs3jf7k8",
"detail": {
"token_whitelist": {
"token": "terra1ss9zz4873vk4dd8dvua0vm83m6s8k7ctwp9efac0arytn6jthfgsy2d4a9",
"change": {
"new": {
"name": "YFD",
"asset_type": "cw20",
"stable": false,
"oracle_address": ""
}
}
}
}
}
All Vault Proposals:
Gets a list of all vault proposals on the forge contract
{all_vault_proposals:{}}
{"all_vault_proposals":{}}
{
"proposals": [
{
"addr": "terra1ly39tx476q7y3cj9rc33f8agm48ccg7qc02psmm27a4xjw87ut8q0nlwz4",
"index": "1"
},
{
"addr": "terra1zxrsflnvq0w30nj8y5wsezzd298wa4hh5twyv0pnap9gwlnjk6gs6rcj0n",
"index": "2"
},
{
"addr": "terra1pasj32uxqm9l07qm77jxz850p97u02ksgxlqfht054arqcyts6us2nyv6z",
"index": "3"
},
{
"addr": "terra1y40ggukfvxn6dq88re3v726augy34dlvz2v5c503dhjxpfdnwwast6qfpx",
"index": "4"
},
{
"addr": "terra19pm0z0dxyvzelg92ms89k9zsjx0ddpsacxmfhjd7tx4qkr3ms9rqhvdp08",
"index": "5"
},
{
"addr": "terra10cfdellar38usjmum739ngzwd6q9rcf8t5klaz2ax04ak546xs7qpp9t0f",
"index": "6"
}
]
}
Vault Proposal:
Gets details about a vault proposal in the list
{vault_proposal:{idx:"1"}}
{"vault_proposal":{"idx":"1"}}
{
"name": "Foo_name",
"closing_block": 2720790,
"quorum_block": null,
"state": {
"InProgress": {}
},
"addr": "terra1ly39tx476q7y3cj9rc33f8agm48ccg7qc02psmm27a4xjw87ut8q0nlwz4"
}
All Address Whitelist:
Gets a list of all wallet addresses on the smart contract whitelist
{all_address_whitelist:{}}
{"all_address_whitelist":{}}
[
"terra10tl78km5x65cv3jff45ep5333xq79fwdzh4dgz",
"terra13nxtkm3y6elyuapq5ceysz7smlqzdgljxr9lm9",
"terra177halsax009np6s7y0mwq23y5jrl8ww0z8h5n5",
"terra1fq2axrgy7r2hqtxt7x79fm329nd005f2ehddyc",
"terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk",
"terra1q04xu3lcgmzt5ayrx8dxkc6kyu9mpmn35szkgw",
"terra1qje0jdhrhgcnju2ph8jdafcjr252wa2svqj3ly",
"terra1r5h6fmlgc8h7ke2hlzlkgh3kvcdlxcy55s83rc",
"terra1upleyfx24jehpgfy9d79d9scps20ffuf6vy706",
"terra1ymc59uuuklnudfnkwhezzlnmec6f3cze7tsve9"
]
Address Whitelist:
Gets information about an address in the whitelist
{address_whitelist:{addr:"terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk"}}
{"address_whitelist":{"addr":"terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk"}}
{
"name": "Trenten",
"image_link": "https://avatars.githubusercontent.com/u/15914068?v=4",
"roles": [
"developer",
"proposer",
"booster",
"strategist",
"payee"
],
"links": [
"https://github.com/Tgrede"
],
"proposal_id": "init"
}
All Token Whitelist:
Gets a list of all token addresses on the smart contract whitelist
{all_token_whitelist:{}}
{"all_token_whitelist":{}}
[
"terra1ss9zz4873vk4dd8dvua0vm83m6s8k7ctwp9efac0arytn6jthfgsy2d4a9"
]
Token Whitelist:
Gets information about an token in the whitelist
{token_whitelist:{name:"terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk"}}
{"token_whitelist":{"name":"terra1mgwy0jxfsmn8vtyxepntlzk6m7030jejkm5xhk"}}
{
"name": "YFD",
"asset_type": {
"cw20": "terra1ss9zz4873vk4dd8dvua0vm83m6s8k7ctwp9efac0arytn6jthfgsy2d4a9"
},
"stable": false,
"oracle_address": "",
"proposal_id": "1"
}
All Governance Parameter:
Gets a list of all governance parameters
{all_governance_parameter:{}}
{"all_governance_parameter":{}}
[
"ActiveProposalMax",
"EmergencyMajority",
"EmergencyQuorum",
"EmergencyVoteLength",
"FundingRatio",
"GovernanceQuorum",
"GovernanceVoteLength",
"LockingBlockMultiplier",
"MaxLockTime",
"MaxNft"
]
Governance Parameter:
Types
Type | Description |
---|---|
BlockHeight | Block height |
Decimal | Decimal |
Integer | Integer |
ย | ...incomplete list |
Gets information about a governance paramter in the list
{governance_parameter:{name:"GovernanceVoteLength"}}
{"governance_parameter":{"name":"GovernanceVoteLength"}}
{
"name": "Governance Proposal Voting Period Length",
"description": "Amount of blocks that a governance proposal is considered active for voting, after which it no longer accepts votes.",
"parameter_type": {
"BlockHeight": {
"value": "600",
"min": "600",
"max": "438000"
}
},
"active": true
}
Vault Funding Math:
Gets information about required funding information for a vault based on target funding and nft quantity
{vault_funding_math:{target_funding:"67000",nft_quantity:100}}
{"vault_funding_math":{"target_funding":"67000","nft_quantity":100}}
{
"booster_shares": 67,
"treasury_shares": 33,
"share_price": "1000",
"total_funding": "67000",
"strategist_min": "4000"
}