安全部署
该合同载有合同的部署资料 安全合同存放处。 。 。 .
对于每次部署,都提供不同网络的地址和ABI文件。 查看现有版本的概况 json资产。 。 。 .
为增加额外部署,请遵循 安全合同存放处的部署步骤。 。 。 .
安装
- 号 -
npm i @gnosis.pm/safe-deployments - 纱线
yarn add @gnosis.pm/safe-deployments
使用量
可以直接使用 json 文件 资产文件夹 包含地址和abi定义.
另一种方法是使用JavaScript库方法来查询正确的部署. 图书馆支持采用不同的方法来得到具体合同的部署.
每种方法都有选择 DeploymentFilter 作为参数.
interface DeploymentFilter {
version?: string,
released?: boolean, // Defaults to true if no filter is specified
network?: string // Chain id of the network
}
该方法将返回 a SingletonDeployment 对象或 undefined 如果找不到指定过滤器的部署.
interface SingletonDeployment {
defaultAddress: string, // Address the contract was deployed to by the Gnosis team
version: string,
abi: any[],
networkAddresses: Record<string, string>, // Address of the contract by network
contractName: string,
released: boolean // A released version was audited and has a running bug bounty
}
- 结肠炎安全
const safeSingleton = getSafeSingletonDeployment()
// Returns latest contract version, even if not finally released yet
const safeSingletonNightly = getSafeSingletonDeployment({ released: undefined })
// Returns released contract version for specific network
const safeSingletonGörli = getSafeSingletonDeployment({ network: "5" })
// Returns released contract version for specific version
const safeSingleton100 = getSafeSingletonDeployment({ version: "1.0.0" })
// Version with additional events used on L2 networks
const safeL2Singleton = getSafeL2SingletonDeployment()
- 工厂
const proxyFactory = getProxyFactoryDeployment()
- 图书馆
const multiSendLib = getMultiSendDeployment()
const multiSendCallOnlyLib = getMultiSendCallOnlyDeployment()
const createCallLib = getCreateCallDeployment()
- 处理器
// Returns recommended handler
const fallbackHandler = getFallbackHandlerDeployment()
const callbackHandler = getDefaultCallbackHandlerDeployment()
const compatHandler = getCompatibilityFallbackHandlerDeployment()
页:1
网络信息列表可在 链式.网络
许可证
这个库在麻省理工学院下发行.