Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.11;
contract Callee {
uint256 public counter;
function addOne() {
counter = counter + 1;
}
function addNum(uint256 num) {
pragma solidity ^0.4.11;
contract Caller {
event Log(address _address, uint256 _value, bytes _data);
function invoke(address _address, uint256 _value, bytes _data) {
if (_address.call.value(_value)(_data)) {
Log(_address, _value, _data);
}
}
var Caller = artifacts.require("Caller.sol");
var Callee = artifacts.require("Callee.sol");
var abi = require("ethereumjs-abi");
contract("Caller and Callee", function(accounts) {
it("invoke callee via caller", function() {
var caller;
var callee;
return Caller.deployed().then(function(callerInstance) {
caller = callerInstance;

Portal Network - Integration ENS with IPFS

This tutorial is how to post website/application on IPFS and link with ENS domains(.eth).

If you have any question please contact us for help:

Wanchain JSON RPC Provider

HTTP Provider: http://wanchain.portal.network

INFRASTRUCTURE

This is an endpoints as your Wanchain client provider, use JSON RPC.

MAKE REQUESTS

Install IPFS

sudo apt-get update
sudo apt-get install golang-go -y
wget https://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.10_linux-386.tar.gz
tar xvfz go-ipfs_v0.4.15_linux-386.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs

BNS Enhancement

label hash should type by the string and then the setSubdomainOwner change the string using keccak256 to bytes32