github.com/InjectiveLabs/sdk-go@v1.53.0/chain/wasmx/types/util.go (about)

     1  package types
     2  
     3  import (
     4  	"github.com/CosmWasm/wasmd/x/wasm/types"
     5  	sdktypes "github.com/cosmos/cosmos-sdk/types"
     6  )
     7  
     8  func IsAllowed(accessConfig types.AccessConfig, actor sdktypes.AccAddress) bool {
     9  	if accessConfig.Permission == types.AccessTypeAnyOfAddresses {
    10  		for _, v := range accessConfig.Addresses {
    11  			if v == actor.String() {
    12  				return true
    13  			}
    14  		}
    15  	}
    16  	return false
    17  }