Releases: midcontract/protocol
Releases · midcontract/protocol
v1.0.0-rc.25
npm install --save @midcontract/protocol@1.0.0-rc.25
- SDK was migrated to new smart contract architecture
- New escrow contract for 'test' environment https://sepolia.etherscan.io/address/0xd4c83df44115999261b97a9321d44467fa12a94e
- New factory contract for 'test' environment for deploying contracts per user https://sepolia.etherscan.io/address/0xE732a3625499885cE800f795A076C6Daf69e9E3d
- New fee manager contract for 'test' environment for fee management https://sepolia.etherscan.io/address/0xA4857B1178425cfaaaeedBcFc220F242b4A518fA
- New registry contract for 'test' environment for escrow contract configuration https://sepolia.etherscan.io/address/0xcda8DF73fFA90c151879F0E5A46B2ad659502C73
- new Mock USD token for 'test' environment
fullFee key was changed to feeConfig which is enum:
export enum FeeConfig {
CLIENT_COVERS_ALL,
CLIENT_COVERS_ONLY,
CONTRACTOR_COVERS_CLAIM,
NO_FEES,
}
SDK methods updates:
- escrowDeposit() changed input from
export interface DepositInput {
depositId: bigint;
token?: SymbolToken;
amount: number;
timeLock?: bigint;
fullFee?: boolean;
recipientData: Hash;
}
to
export interface DepositInput {
contractorAddress: Address;
token: SymbolToken;
amount: number;
amountToClaim?: number;
timeLock?: bigint;
recipientData: Hash;
feeConfig: FeeConfig;
status?: DepositStatus;
}
- new method
deploy(adminAddress)
, on user's first deposit, before deposit itself, this method should be called in order to deploy a proxy smart contract per user, returns new user smart contract address and salt, both 2 fields should be stored in db. escrowDepositAmount(amount: number, feeConfig: FeeConfig = 1, tokenSymbol: SymbolToken = "MockUSDT")
added new field to input, feeConfig, for now feeConfig has default value CLIENT_COVERS_ONLYescrowMakeDataHash(data: string, salt: Hash)
added new required field in input - saltescrowDeposit(input: DepositInput, waitReceipt = true)
input param changed due to change of deposit interface in SDK, output -> added new field contractId that should be stored in deposit/contract entity in db. This value changed old value -> depositId, and should be used in all methods after deposit (submit, approve, refill, claim, withdraw)
v1.0.0-rc.24
npm install --save @midcontract/protocol@=1.0.0-rc.24
1.0.0-rc.19
npm install --save @midcontract/protocol@1.0.0-rc.19
- Deploy new contract for
test
environment https://sepolia.etherscan.io/address/0x4ae3faf19394532c9a855eaa9fbb4442f99674bf - Fixed partial approval of deposit amount
- Adee shortcut for refill escrow
class MidcontractProtocol {
escrowRefill(depositId: bigint, value: number): Promise<TransactionStatus>;
}
v1.0.0-rc.18
npm install --save @midcontract/protocol@1.0.0-rc.18
Added new methods for getting links to the explorer:
class MidcontractProtocol {
transactionUrl(transactionHash: Hash): string;
accountUrl(account: Address): string;
}
1.0.0-rc.9
feat: new implementation SDK