Skip to content

Commit

Permalink
feat: add claim name contract (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
nachomazzara authored May 9, 2019
1 parent 14f9aaa commit 2aa7598
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/contracts/ClaimName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Contract } from '../ethereum'

const { abi } = require('./artifacts/ClaimName.json')

export class ClaimName extends Contract {
constructor(address: string) {
super(address, abi)
}

getContractName() {
return 'ClaimName'
}
}
257 changes: 257 additions & 0 deletions src/contracts/artifacts/ClaimName.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
{
"contractName": "ClaimName",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_beneficiary",
"type": "address"
},
{
"name": "_userId",
"type": "string"
},
{
"name": "_username",
"type": "string"
},
{
"name": "_metadata",
"type": "string"
}
],
"name": "registerUsername",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_user",
"type": "address"
}
],
"name": "userExists",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_account",
"type": "address"
},
{
"name": "_allowed",
"type": "bool"
}
],
"name": "setAllowance",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "manaToken",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "user",
"outputs": [
{
"name": "userId",
"type": "string"
},
{
"name": "username",
"type": "string"
},
{
"name": "metadata",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "price",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_metadata",
"type": "string"
}
],
"name": "setMetadata",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "allowed",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_username",
"type": "string"
}
],
"name": "isUsernameAvailable",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_mana",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "userId",
"type": "string"
},
{
"indexed": false,
"name": "_username",
"type": "string"
},
{
"indexed": false,
"name": "_metadata",
"type": "string"
},
{
"indexed": true,
"name": "_caller",
"type": "address"
}
],
"name": "Register",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": false,
"name": "_metadata",
"type": "string"
}
],
"name": "MetadataChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_caller",
"type": "address"
},
{
"indexed": true,
"name": "_account",
"type": "address"
},
{
"indexed": false,
"name": "_allowed",
"type": "bool"
}
],
"name": "Allow",
"type": "event"
}
]
}

0 comments on commit 2aa7598

Please sign in to comment.