Skip to main content

Improv hub

The hub contract is responsible for creating new stories and maintaining the state of all ongoing stories.

Messages

InstantiateMsg

Instantiates the Improv hub contract.

JSON
Rust
Copy

_12
_12
{
_12
"owner": "<Terra-address>",
_12
"wormhole_core_bridge_addr": "<Terra-address>",
_12
"wormhole_token_bridge_addr": "<Terra-address>",
_12
"improv_relayer_addr": "<Terra-address>",
_12
"bid_token": "<Terra-address>",
_12
"writing_extension_period": 1661296904,
_12
"auction_report_submission_period": 1661296904,
_12
"voting_period": 1661296904,
_12
"veto_threshold": "0.5"
_12
}

InstantiateMsg

Instantiates the Improv hub contract.

JSON
Rust
CopyExpandClose

_12
_12
{
_12
"owner": "<Terra-address>",
_12
"wormhole_core_bridge_addr": "<Terra-address>",
_12
"wormhole_token_bridge_addr": "<Terra-address>",
_12
"improv_relayer_addr": "<Terra-address>",
_12
"bid_token": "<Terra-address>",
_12
"writing_extension_period": 1661296904,
_12
"auction_report_submission_period": 1661296904,
_12
"voting_period": 1661296904,
_12
"veto_threshold": "0.5"
_12
}

ExecuteMsgs

create_proposal

Creates a new proposal and submit it to the community for casting. Writers post a pitch with a synopsis, open cast positions (character bios), a minimum funding target, deadline, and a self-introduction.

JSON
Rust
Copy

_24
_24
{
_24
"create_proposal": {
_24
"synopsis": "string",
_24
"min_funding_target": "u128",
_24
"writing_deadline": u64,
_24
"bidding_deadline": u64,
_24
"author_self_intro": "string",
_24
"cast": [
_24
{
_24
"chain_id": 2,
_24
"reserve_price": "100000000",
_24
"increment": "10000000",
_24
"collections": [
_24
[
_24
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_24
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128,
_24
95, 211
_24
]
_24
]
_24
}
_24
]
_24
}
_24
}

submit_story

When the writer is finished, they can submit an Arweave or IPFS URI with the plaintext or pdf version of the finished manuscript.

Final versions are denoted using "is_final": true,.

JSON
Rust
Copy

_7
{
_7
"submit_story": {
_7
"proposal_id": 1,
_7
"is_final": false,
_7
"story_uri": "https://example.improv/blank.pdf"
_7
}
_7
}

whitelist_collection (internal)

Allows the contract owner to whitelist new NFT collections.

JSON
Rust
Copy

_10
{
_10
"whitelist_collection": {
_10
"chain_id": 2,
_10
"address": [
_10
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149, 244,
_10
91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128, 95, 211
_10
],
_10
"name": null
_10
}
_10
}

create_proposal

Creates a new proposal and submit it to the community for casting. Writers post a pitch with a synopsis, open cast positions (character bios), a minimum funding target, deadline, and a self-introduction.

submit_story

When the writer is finished, they can submit an Arweave or IPFS URI with the plaintext or pdf version of the finished manuscript.

Final versions are denoted using "is_final": true,.

whitelist_collection (internal)

Allows the contract owner to whitelist new NFT collections.

JSON
Rust
CopyExpandClose

_24
_24
{
_24
"create_proposal": {
_24
"synopsis": "string",
_24
"min_funding_target": "u128",
_24
"writing_deadline": u64,
_24
"bidding_deadline": u64,
_24
"author_self_intro": "string",
_24
"cast": [
_24
{
_24
"chain_id": 2,
_24
"reserve_price": "100000000",
_24
"increment": "10000000",
_24
"collections": [
_24
[
_24
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_24
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128,
_24
95, 211
_24
]
_24
]
_24
}
_24
]
_24
}
_24
}

QueryMsgs

Config

Returns the configuration for the Improv hub.

Request
Copy

_3
{
_3
"config": {}
_3
}

Response
Copy

_11
{
_11
"owner": "terra...",
_11
"wormhole_core_bridge_addr": "terra...",
_11
"wormhole_token_bridge_addr": "terra...",
_11
"improv_relayer_addr": "terra...",
_11
"bid_token": "terra...",
_11
"writing_extension_period": 1661296904,
_11
"auction_report_submission_period": 1661296904,
_11
"voting_period": 1661296904,
_11
"veto_threshold": "0.5"
_11
}

State

Returns the state information of the Improv Hub.

Request
Copy

_3
{
_3
"state": {}
_3
}

Response
Copy

_4
{
_4
"total_proposals": 1,
_4
"total_collections": 1
_4
}

view_proposal

Returns the details of a submitted proposal.

Request
Copy

_3
{
_3
"proposal": { "proposal_id": 1 }
_3
}

Response
Copy

_48
{
_48
"id": 1,
_48
"status": "InAuction",
_48
"title": "Minute to Midnight",
_48
"genre": "Action",
_48
"synopsis": "It took 200,000 years for humans to leave the solar system. Now, there is no return. Join the last of the human race in a fight against the clock. Space is endless, Time is short.",
_48
"min_funding_target": "300000000",
_48
"writing_deadline": 1661296904,
_48
"bidding_deadline": 1661296904,
_48
"author_self_intro": "Will E. Maekit is an award winning novelist and author of "Portent of call."
_48
"author": "terra...",
_48
"is_story_final": false,
_48
"story_uri": "https://mag.wcoomd.org/uploads/2018/05/blank.pdf",
_48
"story_submission_time": 1661296904,
_48
"cast": [
_48
{
_48
"character_id": 1,
_48
"chain_id": 2,
_48
"reserve_price": "100000000",
_48
"increment": "10000000",
_48
"collections": [
_48
[
_48
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_48
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128,
_48
95, 211
_48
]
_48
],
_48
"vote": null,
_48
"bid_amount": "100000000",
_48
"nft_address": [
_48
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_48
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128, 95,
_48
211
_48
],
_48
"nft_token_id": 1,
_48
"name": "Jane",
_48
"description": "An unlikely hero, Jane Goodall is one of only 6000 humans left in the universe. She has lived her entire life on her ship, `Tiwanaku`. The 22 year old daughter of the last human born on Earth, Jane has struggled her whole life to find her place among the last humans. Bold, smart, and rebelious, Jane just wants a few moments by herself, away from the worries and monotony of life on her disintegrating ship. Though she doesn't want to be, she is humanity's last hope."
_48
}
_48
],
_48
"veto_id": 0,
_48
"total_vetoes": 0,
_48
"veto_reports": [],
_48
"auction_reports": [],
_48
"bridged_funds": [],
_48
"proposal_vaa": null,
_48
"lastest_veto_vaa": null,
_48
"is_funds_bridged": false
_48
}

Query Proposals

Query Params

  • filter proposals by:
    • author or
    • status or
    • genre or
    • author and status or
    • genre and status
  • order_by: asc/desc
  • start_at: pagination
  • limit: (max 50)
Request
Copy

_9
{
_9
"proposals": {
_9
"status": "in_writing",
_9
"author": "terra...",
_9
"start_at": null,
_9
"limit": 1,
_9
"order_by": "asc"
_9
}
_9
}

Response
Copy

_54
{
_54
"proposals": [
_54
{
_54
"id": 1,
_54
"status": "InAuction",
_54
"title": "Minute to Midnight",
_54
"genre": "Action",
_54
"synopsis": "It took 200,000 years for humans to leave the solar system. Now, there is no return. Join the last of the human race in a fight against the clock. Space is endless, Time is short.",
_54
"min_funding_target": "300000000",
_54
"writing_deadline": 1661296904,
_54
"bidding_deadline": 1661296904,
_54
"author_self_intro": "Will E. Maekit is an award winning novelist and author of 'Portent of call.'",
_54
"author": "terra...",
_54
"author_self_intro": "Reginald Rose (regie.eth) is a playwright who tweets things about penguins... latest piece was “In the Darkness",
_54
"is_story_final": false,
_54
"story_uri": "https://mag.wcoomd.org/uploads/2018/05/blank.pdf",
_54
"story_submission_time": 1661296904,
_54
"cast": [
_54
{
_54
"character_id": 1,
_54
"chain_id": 2,
_54
"reserve_price": "100000000",
_54
"increment": "10000000",
_54
"collections": [
_54
[
_54
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254,
_54
149, 244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61,
_54
158, 128, 95, 211
_54
]
_54
],
_54
"vote": null,
_54
"bid_amount": "100000000",
_54
"nft_address": [
_54
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_54
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128,
_54
95, 211
_54
],
_54
"nft_token_id": 1,
_54
"name": "George",
_54
"description": "Assistant high school football coach. A small, petty man who is at first vary of, and then impressed with the authority he has. Handles himself quite formally. Not overly bright, but dogged."
_54
}
_54
],
_54
"veto_id": 0,
_54
"total_vetoes": 0,
_54
"veto_reports": [],
_54
"auction_reports": [],
_54
"bridged_funds": [],
_54
"proposal_vaa": null,
_54
"lastest_veto_vaa": null,
_54
"is_funds_bridged": false
_54
}
_54
],
_54
"next_proposal": 2
_54
}

whitelisted_collections

Query the whitelisted collections using the following parameters.

Query Params:

  • order_by: asc/desc
  • start_at: pagination
  • limit: (max 50)
Request
Copy

_8
_8
{
_8
"whitelisted_collections": {
_8
"start_at": null,
_8
"limit": 1,
_8
"order_by": "asc"
_8
}
_8
}

Response
Copy

_16
{
_16
"collections": [
_16
{
_16
"id": 1,
_16
"chain_id": 18,
_16
"address": [
_16
0, 211, 109, 140, 122, 144, 121, 30, 247, 18, 45, 161, 65, 254, 149,
_16
244, 91, 45, 133, 49, 27, 173, 12, 221, 185, 156, 34, 61, 158, 128, 95,
_16
211
_16
],
_16
"name": "Bored Llamas",
_16
"image_uri": "http://a-bored-llama.jpeg"
_16
}
_16
],
_16
"next_collection": 2
_16
}

Config

Returns the configuration for the Improv hub.

State

Returns the state information of the Improv Hub.

view_proposal

Returns the details of a submitted proposal.

Query Proposals

Query Params

  • filter proposals by:
    • author or
    • status or
    • genre or
    • author and status or
    • genre and status
  • order_by: asc/desc
  • start_at: pagination
  • limit: (max 50)

whitelisted_collections

Query the whitelisted collections using the following parameters.

Query Params:

  • order_by: asc/desc
  • start_at: pagination
  • limit: (max 50)
Request
CopyExpandClose

_3
{
_3
"config": {}
_3
}

Response
Copy

_11
{
_11
"owner": "terra...",
_11
"wormhole_core_bridge_addr": "terra...",
_11
"wormhole_token_bridge_addr": "terra...",
_11
"improv_relayer_addr": "terra...",
_11
"bid_token": "terra...",
_11
"writing_extension_period": 1661296904,
_11
"auction_report_submission_period": 1661296904,
_11
"voting_period": 1661296904,
_11
"veto_threshold": "0.5"
_11
}