|
|
|
@ -36,11 +36,20 @@ export function data(params: { ownerAddress: Address; collectionAddress: Address
|
|
|
|
|
return beginCell().storeRef(data_cell).storeBuffer(params.publicKey).endCell(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function collectionData(params: { code: Cell, ownerAddress: Address, ownerKey: number }): Cell { |
|
|
|
|
export function collectionData(params: { |
|
|
|
|
code: Cell, ownerAddress: Address, ownerKey: number, |
|
|
|
|
price_multiplier?: number, price_steepness?: number |
|
|
|
|
}): Cell { |
|
|
|
|
if (params.price_multiplier == undefined) { |
|
|
|
|
params.price_multiplier = 10; |
|
|
|
|
} |
|
|
|
|
if (params.price_steepness == undefined) { |
|
|
|
|
params.price_steepness = 5; |
|
|
|
|
} |
|
|
|
|
return beginCell() |
|
|
|
|
.storeRef(encodeOffChainContent("https://agorata.io/collection.json")) |
|
|
|
|
.storeRef(params.code) |
|
|
|
|
.storeRef(beginCell().endCell()) |
|
|
|
|
.storeRef(beginCell().storeUint(params.price_multiplier, 8).storeUint(params.price_steepness, 4).endCell()) |
|
|
|
|
.storeUint(params.ownerKey, 256) |
|
|
|
|
.storeAddress(params.ownerAddress) |
|
|
|
|
.endCell(); |
|
|
|
@ -54,7 +63,9 @@ export function setContractBalance(contract: SmartContract, balance: number) {
|
|
|
|
|
contract.setC7Config({balance: balance}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function TON(): number { return 1000000000; } |
|
|
|
|
export function TON(): number { |
|
|
|
|
return 1000000000; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// message encoders for all ops (see contracts/imports/constants.fc for consts)
|
|
|
|
|
|
|
|
|
|