Questions tagged [smart-lock]
A smart-lock is an embedded device that provides physical security to an asset. It locks/unlocks itself based on instructions received from a recognised smart contract running on a blockchain.
15 questions
10
votes
3
answers
735
views
How do smart locks make sure that they have access to an up-to-date version of the blockchain?
Smart locks like Slock.it are supposed to allow locks to be able to do things based on the blockchain state. Does that work with locks that don't have their own internet connection? If so, how does ...
6
votes
2
answers
2k
views
Smart contract erc20 code snippet to prevent buyer token transfers
I´m going to start a token pre-sale and I want to be able to send the tokens to the buyer but prevent the buyer to send tokens to another wallet.
I tried the following in my ERC20 smart contract but ...
4
votes
2
answers
3k
views
How to lock eth into a smart contract for a certain amount of time?
Is there any way to send an amount of eth to a smart contract address setting a delay time before the sender address could redeem?
1
vote
2
answers
299
views
Slackness issue and time in smart contracts
At a high level, slackness issue says, it is not possible to guarantee that at any given point in time all honest miners see exactly the same blockchain length [1].
On the other hand, as we know the ...
1
vote
1
answer
622
views
What is this function do internally of Time Lock Controller of Solidity?
function hashOperation(
address target,
uint256 value,
bytes calldata data,
bytes32 predecessor,
bytes32 salt
) public pure virtual returns (bytes32 hash) {
return keccak256(...
1
vote
1
answer
242
views
Time-locked deposit protocol?
I am designing a protocol where a user A sends a time-locked deposit to user that if the user B within time t provide a proof that he exists in a location x (this may be obtained by third party like ...
1
vote
1
answer
359
views
Lock and unlock token smart contract
What is best way to write a smart-contract that can allow manual locking and unlocking of token specified by user without requiring transaction fee?
say and escrow lock and unlock of of asset.
1
vote
0
answers
98
views
Is there a way to encrypt data on a smart contract in a secure way?
Is there a way to encrypt data on a smart contract in a secure way?
For instance - I have a smart lock that at any point I want only one user to open.
So I thought maybe a smart contract will check if ...
1
vote
1
answer
96
views
Solidity: Smart Contract, always get wrong result
I'm writing a token locker contract, code as following:
pragma solidity ^0.4.24;
import "./SafeMath.sol";
import "./ERC20.sol";
contract TokenLocker {
using SafeMath for uint256;
address ...
0
votes
1
answer
3k
views
Type bytes memory is not implicitly convertible to expected type bytes calldata
I'm using the openzeppelin library of TimelockController.sol. Specifically using the library's schedule function.
function schedule(
address target,
uint256 value,
bytes ...
0
votes
0
answers
28
views
Can I use ChainLink and Oracles to secure an unsupervised business operation?
For example, could a potential manufacturing and distribution partner in Brazil be monitored, and audited to have actions triggered like distribution of sales revenue based on receipt of sales revenue?...
0
votes
1
answer
71
views
Creating a smart contract with ipfs
I created a site with the help of ipfs, my goal is to create a smart contract with the ipfs CID of this site. but i have no idea about this, can anyone help?
0
votes
0
answers
103
views
Safest way to manage my assets from a smart contract
I am working in a develop for manage all the assets of my company. Actually we are using fireblocks for have all of our asset safety.
But the problem with this service is, that they do not have ...
0
votes
1
answer
144
views
How to create different structs through an array argument
I am trying to create different structs by passing the necessary components of the struct through an array in the arguments. So far, the compiler does not complain but when i execute the transaction, ...
0
votes
1
answer
300
views
How can smart lock inform Contract that it has been locked?
Suppose Smart lock (SL) has an Internet connection.
How can SL send message to Smart Contract when User close SL?
How to protect from reply attack? Is there any gas effective way to check SL ...