pragma solidity ^0.4.21;
contract DLL {
struct Node {
uint[3][3] data;
uint prev;
uint next;
}
Node[] public nodes;
uint n = 3;
uint h=0;
function initArray() public payable {
while(h!=5)
{
uint[3][3] memory result;
for (uint i = 0; i < n; i++){
for(uint j = 0; j < n; j++){
result[i][j] = 1;
}
}
nodes.push(Node(result, 0, 0));
insert(h,result);
h=h+1;
}
}
function insert(uint id, uint[3][3] data) public{
require(id == 0 || isValidNode(id));
Node storage node = nodes[id];
uint newID;
nodes.push(Node({
data: data,
prev: id,
next: node.next
}));
newID = nodes.length - 1;
nodes[node.next].prev = newID;
node.next = newID;
}
function isValidNode(uint256 id) internal view returns (bool) {
return id != 0 && (id == nodes[0].next || nodes[id].prev != 0);
}
}
Im having trouble using remixd... I have a contracts file with path /Users/my_name/project/contracts
and I start remixd like so:
remixd -s /Users/my_name/project/contracts --remix-ide https://remix.ethereum.org
Yet it doesn't start up the daemon. Just says:
[WARN] You may now only use IDE at https://remix.ethereum.org to connect to that instance
[WARN] Any application that runs on your computer can potentially read from and write to all files in the directory.
[WARN] Symbolic links are not forwarded to Remix IDE
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
to the actual github URL import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
.I can't really tell, sounds like this token was created a while ago
I created this token 3 years ago