Skip to content

Commit

Permalink
🐛 Fix ContractState mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bal7hazar committed Jul 19, 2023
1 parent a6ccef4 commit 8e82394
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/interfaces/pufu.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ trait IPufu<TContractState> {
ref self: TContractState, address: ContractAddress, components: Array<felt252>
);
fn delete_source(ref self: TContractState, address: ContractAddress);
fn compose(self: @TContractState, address: ContractAddress, token_id: u256);
fn decompose(self: @TContractState, address: ContractAddress, token_id: u256);
fn compose(ref self: TContractState, address: ContractAddress, token_id: u256);
fn decompose(ref self: TContractState, address: ContractAddress, token_id: u256);
fn register_token(
ref self: TContractState,
address: ContractAddress,
Expand Down
4 changes: 2 additions & 2 deletions src/pufu.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ mod pufu {
};
}

fn compose(self: @ContractState, address: ContractAddress, token_id: u256) {
fn compose(ref self: ContractState, address: ContractAddress, token_id: u256) {
let mut source_components = self._source_components.read(address);

// [Compute] Token components (could be empty)
Expand Down Expand Up @@ -370,7 +370,7 @@ mod pufu {
erc721.transfer_from(contract, caller, token_id);
}

fn decompose(self: @ContractState, address: ContractAddress, token_id: u256) {
fn decompose(ref self: ContractState, address: ContractAddress, token_id: u256) {
//[Check] caller is the ERC721 owner
let caller = get_caller_address();
let erc721_contract = IERC721Dispatcher { contract_address: address };
Expand Down

0 comments on commit 8e82394

Please sign in to comment.