universal contract update
This commit is contained in:
1 parent
5b750b12cf
commit
b434447aef
5 files changed
+177
-49
No files matched your search
@@ -0,0 +1,6 @@
|
||||
import { CompilerConfig } from '@ton/blueprint';
|
||||
|
||||
export const compile: CompilerConfig = {
|
||||
lang: 'func',
|
||||
targets: ['contracts/signature_mem_contract.fc'],
|
||||
};
|
||||
@@ -3,7 +3,8 @@ import { Address, beginCell, Cell, Contract, contractAddress, ContractProvider,
|
||||
export type UniversalWalletContractConfig = {
|
||||
subwalletId: number,
|
||||
publicKey: Buffer,
|
||||
admin: Address
|
||||
admin: Address,
|
||||
memCode: Cell
|
||||
};
|
||||
|
||||
export function universalWalletContractConfigToCell(config: UniversalWalletContractConfig): Cell {
|
||||
@@ -14,8 +15,7 @@ export function universalWalletContractConfigToCell(config: UniversalWalletContr
|
||||
.storeRef(
|
||||
beginCell()
|
||||
.storeBuffer(config.publicKey)
|
||||
.storeUint(0, 64)
|
||||
.storeUint(0, 1)
|
||||
.storeRef(config.memCode)
|
||||
.endCell()
|
||||
)
|
||||
.endCell();
|
||||
@@ -97,8 +97,7 @@ export class UniversalWalletContract implements Contract {
|
||||
let stack = (await provider.get('get_message_states', [])).stack;
|
||||
return {
|
||||
publicKey: stack.readBigNumber(),
|
||||
stateCleaned: stack.readNumber(),
|
||||
oldQueries: stack.readCellOpt()
|
||||
memCode: stack.readCell()
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user