Skip to main content

DenyRuleSet

type DenyRuleSet​

A complete set of transaction deny rules.

The deny lists are exposed as sequences over the FFI; converting into the underlying set-typed Rust representation sorts and deduplicates them, so the BCS encoding is canonical regardless of the order supplied here.

BCS​

The BCS serialized form for this type is defined by the following ABNF:

```text deny-rule-set = (vector address) ; denied addresses (vector object-id) ; denied objects (vector object-id) ; denied packages bool ; package publish disabled bool ; package upgrade disabled bool ; shared object disabled bool ; user transaction disabled bool ; receiving objects disabled bool ; move authenticator disabled ```

type DenyRuleSet struct {
// Addresses denied as transaction sender or gas sponsor. A denied
// address can still receive objects.
DeniedAddresses []*Address
// Objects denied as transaction inputs or receiving objects.
DeniedObjects []*ObjectId
// Packages denied as a (transitive) dependency of any command; upgrading
// a denied package is denied too.
DeniedPackages []*ObjectId
// Denies all package publishing.
PackagePublishDisabled bool
// Denies all package upgrades.
PackageUpgradeDisabled bool
// Denies transactions that use shared objects as inputs.
SharedObjectDisabled bool
// Denies all user transactions (kill switch).
UserTransactionDisabled bool
// Denies transactions that contain receiving objects.
ReceivingObjectsDisabled bool
// Denies transactions signed with a Move authenticator.
MoveAuthenticatorDisabled bool
}

func DenyRuleSetFromBcs​

func DenyRuleSetFromBcs(bcs []byte) (DenyRuleSet, error)

Create this type from BCS encoded bytes.

func DenyRuleSetFromJson​

func DenyRuleSetFromJson(json string) (DenyRuleSet, error)

Create this type from JSON encoded string.

func (*DenyRuleSet) Destroy​

func (r *DenyRuleSet) Destroy()