{ "contract_name": "cw-payroll-factory", "contract_version": "2.6.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "vesting_code_id" ], "properties": { "owner": { "type": [ "string", "null" ] }, "vesting_code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "description": "Instantiates a new vesting contract that is funded by a cw20 token.", "type": "object", "required": [ "receive" ], "properties": { "receive": { "$ref": "#/definitions/Cw20ReceiveMsg" } }, "additionalProperties": false }, { "description": "Instantiates a new vesting contract that is funded by a native token.", "type": "object", "required": [ "instantiate_native_payroll_contract" ], "properties": { "instantiate_native_payroll_contract": { "type": "object", "required": [ "instantiate_msg", "label" ], "properties": { "instantiate_msg": { "$ref": "#/definitions/InstantiateMsg" }, "label": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Callable only by the current owner. Updates the code ID used while instantiating vesting contracts.", "type": "object", "required": [ "update_code_id" ], "properties": { "update_code_id": { "type": "object", "required": [ "vesting_code_id" ], "properties": { "vesting_code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Update the contract's ownership. The `action` to be provided can be either to propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership permanently.", "type": "object", "required": [ "update_ownership" ], "properties": { "update_ownership": { "$ref": "#/definitions/Action" } }, "additionalProperties": false } ], "definitions": { "Action": { "description": "Actions that can be taken to alter the contract's ownership", "oneOf": [ { "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", "type": "object", "required": [ "transfer_ownership" ], "properties": { "transfer_ownership": { "type": "object", "required": [ "new_owner" ], "properties": { "expiry": { "anyOf": [ { "$ref": "#/definitions/Expiration" }, { "type": "null" } ] }, "new_owner": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", "type": "string", "enum": [ "accept_ownership" ] }, { "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", "type": "string", "enum": [ "renounce_ownership" ] } ] }, "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Cw20ReceiveMsg": { "description": "Cw20ReceiveMsg should be de/serialized under `Receive()` variant in a ExecuteMsg", "type": "object", "required": [ "amount", "msg", "sender" ], "properties": { "amount": { "$ref": "#/definitions/Uint128" }, "msg": { "$ref": "#/definitions/Binary" }, "sender": { "type": "string" } }, "additionalProperties": false }, "Expiration": { "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ "at_height" ], "properties": { "at_height": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, { "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ "at_time" ], "properties": { "at_time": { "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ "never" ], "properties": { "never": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "InstantiateMsg": { "type": "object", "required": [ "denom", "recipient", "schedule", "title", "total", "unbonding_duration_seconds", "vesting_duration_seconds" ], "properties": { "denom": { "description": "The type and denom of token being vested.", "allOf": [ { "$ref": "#/definitions/UncheckedDenom" } ] }, "description": { "description": "A description for the payment to provide more context.", "type": [ "string", "null" ] }, "owner": { "description": "The optional owner address of the contract. If an owner is specified, the owner may cancel the vesting contract at any time and withdraw unvested funds.", "type": [ "string", "null" ] }, "recipient": { "description": "The receiver address of the vesting tokens.", "type": "string" }, "schedule": { "description": "The vesting schedule, can be either `SaturatingLinear` vesting (which vests evenly over time), or `PiecewiseLinear` which can represent a more complicated vesting schedule.", "allOf": [ { "$ref": "#/definitions/Schedule" } ] }, "start_time": { "description": "The time to start vesting, or None to start vesting when the contract is instantiated. `start_time` may be in the past, though the contract checks that `start_time + vesting_duration_seconds > now`. Otherwise, this would amount to a regular fund transfer.", "anyOf": [ { "$ref": "#/definitions/Timestamp" }, { "type": "null" } ] }, "title": { "description": "The a name or title for this payment.", "type": "string" }, "total": { "description": "The total amount of tokens to be vested.", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "unbonding_duration_seconds": { "description": "The unbonding duration for the chain this contract is deployed on. Smart contracts do not have access to this data as stargate queries are disabled on most chains, and cosmwasm-std provides no way to query it.\n\nThis value being too high will cause this contract to hold funds for longer than needed, this value being too low will reduce the quality of error messages and require additional external calculations with correct values to withdraw avaliable funds from the contract.", "type": "integer", "format": "uint64", "minimum": 0.0 }, "vesting_duration_seconds": { "description": "The length of the vesting schedule in seconds. Must be non-zero, though one second vesting durations are allowed. This may be combined with a `start_time` in the future to create an agreement that instantly vests at a time in the future, and allows the receiver to stake vesting tokens before the agreement completes.\n\nSee `suite_tests/tests.rs` `test_almost_instavest_in_the_future` for an example of this.", "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, "Schedule": { "oneOf": [ { "description": "Vests linearally from `0` to `total`.", "type": "string", "enum": [ "saturating_linear" ] }, { "description": "Vests by linearally interpolating between the provided (seconds, amount) points. The first amount must be zero and the last amount the total vesting amount. `seconds` are seconds since the vest start time.\n\nThere is a problem in the underlying Curve library that doesn't allow zero start values, so the first value of `seconds` must be > 1. To start at a particular time (if you need that level of percision), subtract one from the true start time, and make the first `seconds` value `1`.\n\n", "type": "object", "required": [ "piecewise_linear" ], "properties": { "piecewise_linear": { "type": "array", "items": { "type": "array", "items": [ { "type": "integer", "format": "uint64", "minimum": 0.0 }, { "$ref": "#/definitions/Uint128" } ], "maxItems": 2, "minItems": 2 } } }, "additionalProperties": false } ] }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" }, "UncheckedDenom": { "description": "A denom that has not been checked to confirm it points to a valid asset.", "oneOf": [ { "description": "A native (bank module) asset.", "type": "object", "required": [ "native" ], "properties": { "native": { "type": "string" } }, "additionalProperties": false }, { "description": "A cw20 asset.", "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "type": "string" } }, "additionalProperties": false } ] } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "description": "Returns list of all vesting payment contracts", "type": "object", "required": [ "list_vesting_contracts" ], "properties": { "list_vesting_contracts": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of all vesting payment contracts in reverse", "type": "object", "required": [ "list_vesting_contracts_reverse" ], "properties": { "list_vesting_contracts_reverse": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_before": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of all vesting payment contracts by who instantiated them", "type": "object", "required": [ "list_vesting_contracts_by_instantiator" ], "properties": { "list_vesting_contracts_by_instantiator": { "type": "object", "required": [ "instantiator" ], "properties": { "instantiator": { "type": "string" }, "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_after": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of all vesting payment contracts by who instantiated them in reverse", "type": "object", "required": [ "list_vesting_contracts_by_instantiator_reverse" ], "properties": { "list_vesting_contracts_by_instantiator_reverse": { "type": "object", "required": [ "instantiator" ], "properties": { "instantiator": { "type": "string" }, "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "start_before": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of all vesting payment contracts by recipient", "type": "object", "required": [ "list_vesting_contracts_by_recipient" ], "properties": { "list_vesting_contracts_by_recipient": { "type": "object", "required": [ "recipient" ], "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "recipient": { "type": "string" }, "start_after": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns list of all vesting payment contracts by recipient in reverse", "type": "object", "required": [ "list_vesting_contracts_by_recipient_reverse" ], "properties": { "list_vesting_contracts_by_recipient_reverse": { "type": "object", "required": [ "recipient" ], "properties": { "limit": { "type": [ "integer", "null" ], "format": "uint32", "minimum": 0.0 }, "recipient": { "type": "string" }, "start_before": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns info about the contract ownership, if set", "type": "object", "required": [ "ownership" ], "properties": { "ownership": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Returns the code ID currently being used to instantiate vesting contracts.", "type": "object", "required": [ "code_id" ], "properties": { "code_id": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "migrate": null, "sudo": null, "responses": { "code_id": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "uint64", "type": "integer", "format": "uint64", "minimum": 0.0 }, "list_vesting_contracts": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "list_vesting_contracts_by_instantiator": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "list_vesting_contracts_by_instantiator_reverse": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "list_vesting_contracts_by_recipient": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "list_vesting_contracts_by_recipient_reverse": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "list_vesting_contracts_reverse": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Array_of_VestingContract", "type": "array", "items": { "$ref": "#/definitions/VestingContract" }, "definitions": { "VestingContract": { "type": "object", "required": [ "contract", "instantiator", "recipient" ], "properties": { "contract": { "type": "string" }, "instantiator": { "type": "string" }, "recipient": { "type": "string" } }, "additionalProperties": false } } }, "ownership": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Ownership_for_Addr", "description": "The contract's ownership info", "type": "object", "properties": { "owner": { "description": "The contract's current owner. `None` if the ownership has been renounced.", "anyOf": [ { "$ref": "#/definitions/Addr" }, { "type": "null" } ] }, "pending_expiry": { "description": "The deadline for the pending owner to accept the ownership. `None` if there isn't a pending ownership transfer, or if a transfer exists and it doesn't have a deadline.", "anyOf": [ { "$ref": "#/definitions/Expiration" }, { "type": "null" } ] }, "pending_owner": { "description": "The account who has been proposed to take over the ownership. `None` if there isn't a pending ownership transfer.", "anyOf": [ { "$ref": "#/definitions/Addr" }, { "type": "null" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Expiration": { "description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)", "oneOf": [ { "description": "AtHeight will expire when `env.block.height` >= height", "type": "object", "required": [ "at_height" ], "properties": { "at_height": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false }, { "description": "AtTime will expire when `env.block.time` >= time", "type": "object", "required": [ "at_time" ], "properties": { "at_time": { "$ref": "#/definitions/Timestamp" } }, "additionalProperties": false }, { "description": "Never will never expire. Used to express the empty variant", "type": "object", "required": [ "never" ], "properties": { "never": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "Timestamp": { "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", "allOf": [ { "$ref": "#/definitions/Uint64" } ] }, "Uint64": { "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", "type": "string" } } } } }