arc_dx
Version:
A platform for building DAOs
936 lines • 302 kB
JSON
{
"contractName": "Avatar",
"abi": [
{
"constant": true,
"inputs": [],
"name": "orgName",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "nativeReputation",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "nativeToken",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"name": "_orgName",
"type": "string"
},
{
"name": "_nativeToken",
"type": "address"
},
{
"name": "_nativeReputation",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"payable": true,
"stateMutability": "payable",
"type": "fallback"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_contract",
"type": "address"
},
{
"indexed": false,
"name": "_params",
"type": "bytes"
}
],
"name": "GenericCall",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_amountInWei",
"type": "uint256"
},
{
"indexed": true,
"name": "_to",
"type": "address"
}
],
"name": "SendEther",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_externalToken",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "ExternalTokenTransfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_externalToken",
"type": "address"
},
{
"indexed": false,
"name": "_from",
"type": "address"
},
{
"indexed": false,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "ExternalTokenTransferFrom",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_externalToken",
"type": "address"
},
{
"indexed": false,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_addedValue",
"type": "uint256"
}
],
"name": "ExternalTokenIncreaseApproval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_externalToken",
"type": "address"
},
{
"indexed": false,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_subtractedValue",
"type": "uint256"
}
],
"name": "ExternalTokenDecreaseApproval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_sender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "ReceiveEther",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
}
],
"name": "OwnershipRenounced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_contract",
"type": "address"
},
{
"name": "_data",
"type": "bytes"
}
],
"name": "genericCall",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_amountInWei",
"type": "uint256"
},
{
"name": "_to",
"type": "address"
}
],
"name": "sendEther",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_externalToken",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "externalTokenTransfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_externalToken",
"type": "address"
},
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "externalTokenTransferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_externalToken",
"type": "address"
},
{
"name": "_spender",
"type": "address"
},
{
"name": "_addedValue",
"type": "uint256"
}
],
"name": "externalTokenIncreaseApproval",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_externalToken",
"type": "address"
},
{
"name": "_spender",
"type": "address"
},
{
"name": "_subtractedValue",
"type": "uint256"
}
],
"name": "externalTokenDecreaseApproval",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405234801561001057600080fd5b50604051610d79380380610d7983398101604090815281516020808401519284015160008054600160a060020a03191633179055919093018051909361005b9160019186019061008e565b5060028054600160a060020a03938416600160a060020a0319918216179091556003805492909316911617905550610129565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100cf57805160ff19168380011785556100fc565b828001600101855582156100fc579182015b828111156100fc5782518255916020019190600101906100e1565b5061010892915061010c565b5090565b61012691905b808211156101085760008155600101610112565b90565b610c41806101386000396000f3006080604052600436106100a05763ffffffff60e060020a6000350416631386dc2d81146100d85780634650c30814610162578063715018a6146101cb57806389ae1c90146101e05780638cf1355c146102115780638da5cb5b1461024f578063b756d5a214610264578063cb16d4a214610294578063d29ab9c4146102b8578063dab0efff146102e2578063e1758bd81461030c578063f2fde38b14610321575b60408051348152905133917ff32a9f77675fd5917534c7746608fd3e309eac68fbdcbf5925e24ca97a704396919081900360200190a2005b3480156100e457600080fd5b506100ed610342565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012757818101518382015260200161010f565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101c9958335600160a060020a03169536956044949193909101919081908401838280828437509497506103cf9650505050505050565b005b3480156101d757600080fd5b506101c961051f565b3480156101ec57600080fd5b506101f561058b565b60408051600160a060020a039092168252519081900360200190f35b34801561021d57600080fd5b5061023b600160a060020a036004358116906024351660443561059a565b604080519115158252519081900360200190f35b34801561025b57600080fd5b506101f56106fe565b34801561027057600080fd5b5061023b600160a060020a036004358116906024358116906044351660643561070d565b3480156102a057600080fd5b5061023b600435600160a060020a036024351661079a565b3480156102c457600080fd5b5061023b600160a060020a0360043581169060243516604435610831565b3480156102ee57600080fd5b5061023b600160a060020a0360043581169060243516604435610995565b34801561031857600080fd5b506101f5610a1c565b34801561032d57600080fd5b506101c9600160a060020a0360043516610a2b565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103c75780601f1061039c576101008083540402835291602001916103c7565b820191906000526020600020905b8154815290600101906020018083116103aa57829003601f168201915b505050505081565b60008054600160a060020a031633146103e757600080fd5b82600160a060020a03167f60cb6ac4ce80ddf7e096689e155fdb7a4e5354b2fc7bd67157bde32a1ce44cb6836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610450578181015183820152602001610438565b50505050905090810190601f16801561047d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a282600160a060020a03168260405180828051906020019080838360005b838110156104bf5781810151838201526020016104a7565b50505050905090810190601f1680156104ec5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505090503d6000803e808015610514573d6000f35b3d6000fd5b50505050565b600054600160a060020a0316331461053657600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a031681565b60008054600160a060020a031633146105b257600080fd5b83600160a060020a031663d73dd62384846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b505115156106ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e63726561736520617070726f76616c206d75737420737563636565640000604482015290519081900360640190fd5b60408051600160a060020a038581168252602082018590528251908716927fbe7df27d98bd0614ae920a695c2c2be09c164d8456083da020a98538692c465f928290030190a25060019392505050565b600054600160a060020a031681565b60008054600160a060020a0316331461072557600080fd5b610740600160a060020a03861685858563ffffffff610a4e16565b60408051600160a060020a03868116825285811660208301528183018590529151918716917f179c15de44aa7ab84896301974328eb40b5b40fe01cfe0fee2924ea712c3e8439181900360600190a2506001949350505050565b60008054600160a060020a031633146107b257600080fd5b604051600160a060020a0383169084156108fc029085906000818181858888f193505050501580156107e8573d6000803e3d6000fd5b50604080518481529051600160a060020a038416917f22fca66666089f39bc900dd6605b489df4aae6260cc8ea8257594cfb8c84926c919081900360200190a250600192915050565b60008054600160a060020a0316331461084957600080fd5b83600160a060020a0316636618846384846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156108ac57600080fd5b505af11580156108c0573d6000803e3d6000fd5b505050506040513d60208110156108d657600080fd5b5051151561094557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f646563726561736520617070726f76616c206d75737420737563636565640000604482015290519081900360640190fd5b60408051600160a060020a038581168252602082018590528251908716927f495e426dd61227fe840d969dfba17620c573364af8c37748ea71f96f744ae334928290030190a25060019392505050565b60008054600160a060020a031633146109ad57600080fd5b6109c7600160a060020a038516848463ffffffff610af916565b82600160a060020a031684600160a060020a03167f49dc2a60d2599a7b6932d78fb694c30dfc596fe4e0282b5d0fd184b52472c04d846040518082815260200191505060405180910390a35060019392505050565b600254600160a060020a031681565b600054600160a060020a03163314610a4257600080fd5b610a4b81610b98565b50565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b158015610ac257600080fd5b505af1158015610ad6573d6000803e3d6000fd5b505050506040513d6020811015610aec57600080fd5b5051151561051957600080fd5b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610b5c57600080fd5b505af1158015610b70573d6000803e3d6000fd5b505050506040513d6020811015610b8657600080fd5b50511515610b9357600080fd5b505050565b600160a060020a0381161515610bad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a7230582008511222a62de66e57f99b52b7a1a9f7f04858eb28e38e76d4eb84601b6e9dbe0029",
"deployedBytecode": "0x6080604052600436106100a05763ffffffff60e060020a6000350416631386dc2d81146100d85780634650c30814610162578063715018a6146101cb57806389ae1c90146101e05780638cf1355c146102115780638da5cb5b1461024f578063b756d5a214610264578063cb16d4a214610294578063d29ab9c4146102b8578063dab0efff146102e2578063e1758bd81461030c578063f2fde38b14610321575b60408051348152905133917ff32a9f77675fd5917534c7746608fd3e309eac68fbdcbf5925e24ca97a704396919081900360200190a2005b3480156100e457600080fd5b506100ed610342565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012757818101518382015260200161010f565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101c9958335600160a060020a03169536956044949193909101919081908401838280828437509497506103cf9650505050505050565b005b3480156101d757600080fd5b506101c961051f565b3480156101ec57600080fd5b506101f561058b565b60408051600160a060020a039092168252519081900360200190f35b34801561021d57600080fd5b5061023b600160a060020a036004358116906024351660443561059a565b604080519115158252519081900360200190f35b34801561025b57600080fd5b506101f56106fe565b34801561027057600080fd5b5061023b600160a060020a036004358116906024358116906044351660643561070d565b3480156102a057600080fd5b5061023b600435600160a060020a036024351661079a565b3480156102c457600080fd5b5061023b600160a060020a0360043581169060243516604435610831565b3480156102ee57600080fd5b5061023b600160a060020a0360043581169060243516604435610995565b34801561031857600080fd5b506101f5610a1c565b34801561032d57600080fd5b506101c9600160a060020a0360043516610a2b565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103c75780601f1061039c576101008083540402835291602001916103c7565b820191906000526020600020905b8154815290600101906020018083116103aa57829003601f168201915b505050505081565b60008054600160a060020a031633146103e757600080fd5b82600160a060020a03167f60cb6ac4ce80ddf7e096689e155fdb7a4e5354b2fc7bd67157bde32a1ce44cb6836040518080602001828103825283818151815260200191508051906020019080838360005b83811015610450578181015183820152602001610438565b50505050905090810190601f16801561047d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a282600160a060020a03168260405180828051906020019080838360005b838110156104bf5781810151838201526020016104a7565b50505050905090810190601f1680156104ec5780820380516001836020036101000a031916815260200191505b509150506000604051808303816000865af191505090503d6000803e808015610514573d6000f35b3d6000fd5b50505050565b600054600160a060020a0316331461053657600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a031681565b60008054600160a060020a031633146105b257600080fd5b83600160a060020a031663d73dd62384846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b505115156106ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e63726561736520617070726f76616c206d75737420737563636565640000604482015290519081900360640190fd5b60408051600160a060020a038581168252602082018590528251908716927fbe7df27d98bd0614ae920a695c2c2be09c164d8456083da020a98538692c465f928290030190a25060019392505050565b600054600160a060020a031681565b60008054600160a060020a0316331461072557600080fd5b610740600160a060020a03861685858563ffffffff610a4e16565b60408051600160a060020a03868116825285811660208301528183018590529151918716917f179c15de44aa7ab84896301974328eb40b5b40fe01cfe0fee2924ea712c3e8439181900360600190a2506001949350505050565b60008054600160a060020a031633146107b257600080fd5b604051600160a060020a0383169084156108fc029085906000818181858888f193505050501580156107e8573d6000803e3d6000fd5b50604080518481529051600160a060020a038416917f22fca66666089f39bc900dd6605b489df4aae6260cc8ea8257594cfb8c84926c919081900360200190a250600192915050565b60008054600160a060020a0316331461084957600080fd5b83600160a060020a0316636618846384846040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156108ac57600080fd5b505af11580156108c0573d6000803e3d6000fd5b505050506040513d60208110156108d657600080fd5b5051151561094557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f646563726561736520617070726f76616c206d75737420737563636565640000604482015290519081900360640190fd5b60408051600160a060020a038581168252602082018590528251908716927f495e426dd61227fe840d969dfba17620c573364af8c37748ea71f96f744ae334928290030190a25060019392505050565b60008054600160a060020a031633146109ad57600080fd5b6109c7600160a060020a038516848463ffffffff610af916565b82600160a060020a031684600160a060020a03167f49dc2a60d2599a7b6932d78fb694c30dfc596fe4e0282b5d0fd184b52472c04d846040518082815260200191505060405180910390a35060019392505050565b600254600160a060020a031681565b600054600160a060020a03163314610a4257600080fd5b610a4b81610b98565b50565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a0385811660048301528481166024830152604482018490529151918616916323b872dd916064808201926020929091908290030181600087803b158015610ac257600080fd5b505af1158015610ad6573d6000803e3d6000fd5b505050506040513d6020811015610aec57600080fd5b5051151561051957600080fd5b82600160a060020a031663a9059cbb83836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610b5c57600080fd5b505af1158015610b70573d6000803e3d6000fd5b505050506040513d6020811015610b8657600080fd5b50511515610b9357600080fd5b505050565b600160a060020a0381161515610bad57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a7230582008511222a62de66e57f99b52b7a1a9f7f04858eb28e38e76d4eb84601b6e9dbe0029",
"sourceMap": "388:5211:1:-;;;1340:206;8:9:-1;5:2;;;30:1;27;20:12;5:2;1340:206:1;;;;;;;;;;;;;;;;;;;;;;;;;;;567:5:55;:18;;-1:-1:-1;;;;;;567:18:55;575:10;567:18;;;1340:206:1;;;;1439:18;;1340:206;;1439:18;;567::55;;1439::1;;;;:::i;:::-;-1:-1:-1;1467:11:1;:26;;-1:-1:-1;;;;;1467:26:1;;;-1:-1:-1;;;;;;1467:26:1;;;;;;;1503:16;:36;;;;;;;;;;;-1:-1:-1;388:5211:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;388:5211:1;;;-1:-1:-1;388:5211:1;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "388:5211:1:-;;;;;;;;-1:-1:-1;388:5211:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1655:35;;;1680:9;1655:35;;;;1668:10;;1655:35;;;;;;;;;;388:5211;461:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;461:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;461:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1972:551;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1972:551:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1972:551:1;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1972:551:1;;-1:-1:-1;1972:551:1;;-1:-1:-1;;;;;;;1972:551:1;;;1001:111:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:55;;;;521:34:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;521:34:1;;;;;;;;-1:-1:-1;;;;;521:34:1;;;;;;;;;;;;;;4478:361;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4478:361:1;-1:-1:-1;;;;;4478:361:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;238:20:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:55;;;;3754:348:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3754:348:1;-1:-1:-1;;;;;3754:348:1;;;;;;;;;;;;;;;;;2739:189;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2739:189:1;;;;;-1:-1:-1;;;;;2739:189:1;;;5220:376;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5220:376:1;-1:-1:-1;;;;;5220:376:1;;;;;;;;;;;;3169:269;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3169:269:1;-1:-1:-1;;;;;3169:269:1;;;;;;;;;;;;488:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:27:1;;;;1274:103:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:55;;;-1:-1:-1;;;;;1274:103:55;;;461:21:1;;;;;;;;;;;;;;;-1:-1:-1;;461:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1972:551::-;2158:11;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;2056::1;;;;;;;;;;;;;;;-1:-1:-1;;;;;2056:28:1;;;;;2078:5;;2056:28;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2056:28:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2172:21;;;;-1:-1:-1;;;;;2172:14:1;;;2187:5;;2172:21;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2172:21:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2158:35;;2342:14;2339:1;2336;2321:36;2374:6;2425:36;;;;2490:14;2487:1;2480:25;2425:36;2444:14;2441:1;2434:25;2367:140;;1972:551;;;:::o;1001:111:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:55;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:55;;;1001:111::o;521:34:1:-;;;-1:-1:-1;;;;;521:34:1;;:::o;4478:361::-;4612:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;4640:54:1;;;;;;-1:-1:-1;;;;;4640:54:1;;;;;;;;;;;;;;;:31;;;;;;:54;;;;;;;;;;;;;;;-1:-1:-1;4640:31:1;:54;;;5:2:-1;;;;30:1;27;20:12;5:2;4640:54:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4640:54:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4640:54:1;4632:96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4743:68;;;-1:-1:-1;;;;;4743:68:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4828:4:1;4478:361;;;;;:::o;238:20:55:-;;;-1:-1:-1;;;;;238:20:55;;:::o;3754:348:1:-;3927:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;3947:51:1;-1:-1:-1;;;;;3947:31:1;;3979:5;3986:3;3991:6;3947:31;:51::i;:::-;4013:61;;;-1:-1:-1;;;;;4013:61:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4091:4:1;3754:348;;;;;;:::o;2739:189::-;2815:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;2831:26:1;;-1:-1:-1;;;;;2831:12:1;;;:26;;;;;;;;;;;;:12;:26;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;2872:28:1;;;;;;;;-1:-1:-1;;;;;2872:28:1;;;;;;;;;;;;;-1:-1:-1;2917:4:1;2739:189;;;;:::o;5220:376::-;5360:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;5388:59:1;;;;;;-1:-1:-1;;;;;5388:59:1;;;;;;;;;;;;;;;:31;;;;;;:59;;;;;;;;;;;;;;;-1:-1:-1;5388:31:1;:59;;;5:2:-1;;;;30:1;27;20:12;5:2;5388:59:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5388:59:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5388:59:1;5380:101;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5496:72;;;-1:-1:-1;;;;;5496:72:1;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5585:4:1;5220:376;;;;;:::o;3169:269::-;3285:4;719:5:55;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;3305:40:1;-1:-1:-1;;;;;3305:27:1;;3333:3;3338:6;3305:27;:40::i;:::-;3360:50;;;;;;;;-1:-1:-1;;;;;3360:50:1;;;;;;;;;;;;;;;;;-1:-1:-1;3427:4:1;3169:269;;;;;:::o;488:27::-;;;-1:-1:-1;;;;;488:27:1;;:::o;1274:103:55:-;719:5;;-1:-1:-1;;;;;719:5:55;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;521:178:61:-;654:39;;;;;;-1:-1:-1;;;;;654:39:61;;;;;;;;;;;;;;;;;;;;;;:19;;;;;;:39;;;;;;;;;;;;;;;-1:-1:-1;654:19:61;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;654:39:61;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;654:39:61;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;654:39:61;646:48;;;;;;;368:149;483:28;;;;;;-1:-1:-1;;;;;483:28:61;;;;;;;;;;;;;;;:15;;;;;;:28;;;;;;;;;;;;;;;-1:-1:-1;483:15:61;:28;;;5:2:-1;;;;30:1;27;20:12;5:2;483:28:61;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;483:28:61;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;483:28:61;475:37;;;;;;;;368:149;;;:::o;1512:171:55:-;-1:-1:-1;;;;;1582:23:55;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:55;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:55;-1:-1:-1;;;;;1661:17:55;;;;;;;;;;1512:171::o",
"source": "pragma solidity ^0.4.25;\n\nimport \"@daostack/infra/contracts/Reputation.sol\";\nimport \"./DAOToken.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\nimport \"openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol\";\n\n\n/**\n * @title An Avatar holds tokens, reputation and ether for a controller\n */\ncontract Avatar is Ownable {\n using SafeERC20 for StandardToken;\n\n string public orgName;\n DAOToken public nativeToken;\n Reputation public nativeReputation;\n\n event GenericCall(address indexed _contract, bytes _params);\n event SendEther(uint _amountInWei, address indexed _to);\n event ExternalTokenTransfer(address indexed _externalToken, address indexed _to, uint _value);\n event ExternalTokenTransferFrom(address indexed _externalToken, address _from, address _to, uint _value);\n event ExternalTokenIncreaseApproval(StandardToken indexed _externalToken, address _spender, uint _addedValue);\n event ExternalTokenDecreaseApproval(StandardToken indexed _externalToken, address _spender, uint _subtractedValue);\n event ReceiveEther(address indexed _sender, uint _value);\n\n /**\n * @dev the constructor takes organization name, native token and reputation system\n and creates an avatar for a controller\n */\n constructor(string _orgName, DAOToken _nativeToken, Reputation _nativeReputation) public {\n orgName = _orgName;\n nativeToken = _nativeToken;\n nativeReputation = _nativeReputation;\n }\n\n /**\n * @dev enables an avatar to receive ethers\n */\n function() public payable {\n emit ReceiveEther(msg.sender, msg.value);\n }\n\n /**\n * @dev perform a generic call to an arbitrary contract\n * @param _contract the contract's address to call\n * @param _data ABI-encoded contract call to call `_contract` address.\n * @return the return bytes of the called contract's function.\n */\n function genericCall(address _contract,bytes _data) public onlyOwner {\n emit GenericCall(_contract,_data);\n // solium-disable-next-line security/no-low-level-calls\n bool result = _contract.call(_data);\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize)\n\n switch result\n // call returns 0 on error.\n case 0 { revert(0, returndatasize) }\n default { return(0, returndatasize) }\n }\n }\n\n /**\n * @dev send ethers from the avatar's wallet\n * @param _amountInWei amount to send in Wei units\n * @param _to send the ethers to this address\n * @return bool which represents success\n */\n function sendEther(uint _amountInWei, address _to) public onlyOwner returns(bool) {\n _to.transfer(_amountInWei);\n emit SendEther(_amountInWei, _to);\n return true;\n }\n\n /**\n * @dev external token transfer\n * @param _externalToken the token contract\n * @param _to the destination address\n * @param _value the amount of tokens to transfer\n * @return bool which represents success\n */\n function externalTokenTransfer(StandardToken _externalToken, address _to, uint _value)\n public onlyOwner returns(bool)\n {\n _externalToken.safeTransfer(_to, _value);\n emit ExternalTokenTransfer(_externalToken, _to, _value);\n return true;\n }\n\n /**\n * @dev external token transfer from a specific account\n * @param _externalToken the token contract\n * @param _from the account to spend token from\n * @param _to the destination address\n * @param _value the amount of tokens to transfer\n * @return bool which represents success\n */\n function externalTokenTransferFrom(\n StandardToken _externalToken,\n address _from,\n address _to,\n uint _value\n )\n public onlyOwner returns(bool)\n {\n _externalToken.safeTransferFrom(_from, _to, _value);\n emit ExternalTokenTransferFrom(_externalToken, _from, _to, _value);\n return true;\n }\n\n /**\n * @dev increase approval for the spender address to spend a specified amount of tokens\n * on behalf of msg.sender.\n * @param _externalToken the address of the Token Contract\n * @param _spender address\n * @param _addedValue the amount of ether (in Wei) which the approval is referring to.\n * @return bool which represents a success\n */\n function externalTokenIncreaseApproval(StandardToken _externalToken, address _spender, uint _addedValue)\n public onlyOwner returns(bool)\n {\n require(_externalToken.increaseApproval(_spender, _addedValue),\"increase approval must succeed\");\n emit ExternalTokenIncreaseApproval(_externalToken, _spender, _addedValue);\n return true;\n }\n\n /**\n * @dev decrease approval for the spender address to spend a specified amount of tokens\n * on behalf of msg.sender.\n * @param _externalToken the address of the Token Contract\n * @param _spender address\n * @param _subtractedValue the amount of ether (in Wei) which the approval is referring to.\n * @return bool which represents a success\n */\n function externalTokenDecreaseApproval(StandardToken _externalToken, address _spender, uint _subtractedValue )\n public onlyOwner returns(bool)\n {\n require(_externalToken.decreaseApproval(_spender, _subtractedValue),\"decrease approval must succeed\");\n emit ExternalTokenDecreaseApproval(_externalToken,_spender, _subtractedValue);\n return true;\n }\n\n}\n",
"sourcePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/Avatar.sol",
"ast": {
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/Avatar.sol",
"exportedSymbols": {
"Avatar": [
333
]
},
"id": 334,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 59,
"literals": [
"solidity",
"^",
"0.4",
".25"
],
"nodeType": "PragmaDirective",
"src": "0:24:1"
},
{
"absolutePath": "@daostack/infra/contracts/Reputation.sol",
"file": "@daostack/infra/contracts/Reputation.sol",
"id": 60,
"nodeType": "ImportDirective",
"scope": 334,
"sourceUnit": 13408,
"src": "26:50:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/Users/oren/daostack/daostack2/daostack/contracts/controller/DAOToken.sol",
"file": "./DAOToken.sol",
"id": 61,
"nodeType": "ImportDirective",
"scope": 334,
"sourceUnit": 2083,
"src": "77:24:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"file": "openzeppelin-solidity/contracts/ownership/Ownable.sol",
"id": 62,
"nodeType": "ImportDirective",
"scope": 334,
"sourceUnit": 20878,
"src": "102:63:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol",
"file": "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol",
"id": 63,
"nodeType": "ImportDirective",
"scope": 334,
"sourceUnit": 21535,
"src": "166:71:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol",
"file": "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol",
"id": 64,
"nodeType": "ImportDirective",
"scope": 334,
"sourceUnit": 21288,
"src": "238:67:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 65,
"name": "Ownable",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 20877,
"src": "407:7:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Ownable_$20877",
"typeString": "contract Ownable"
}
},
"id": 66,
"nodeType": "InheritanceSpecifier",
"src": "407:7:1"
}
],
"contractDependencies": [
20877
],
"contractKind": "contract",
"documentation": "@title An Avatar holds tokens, reputation and ether for a controller",
"fullyImplemented": true,
"id": 333,
"linearizedBaseContracts": [
333,
20877
],
"name": "Avatar",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 69,
"libraryName": {
"contractScope": null,
"id": 67,
"name": "SafeERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21287,
"src": "427:9:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeERC20_$21287",
"typeString": "library SafeERC20"
}
},
"nodeType": "UsingForDirective",
"src": "421:34:1",
"typeName": {
"contractScope": null,
"id": 68,
"name": "StandardToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 21534,
"src": "441:13:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_StandardToken_$21534",
"typeString": "contract StandardToken"
}
}
},
{
"constant": false,
"id": 71,
"name": "orgName",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "461:21:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 70,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "461:6:1",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 73,
"name": "nativeToken",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "488:27:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DAOToken_$2082",
"typeString": "contract DAOToken"
},
"typeName": {
"contractScope": null,
"id": 72,
"name": "DAOToken",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 2082,
"src": "488:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_DAOToken_$2082",
"typeString": "contract DAOToken"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 75,
"name": "nativeReputation",
"nodeType": "VariableDeclaration",
"scope": 333,
"src": "521:34:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Reputation_$13407",
"typeString": "contract Reputation"
},
"typeName": {
"contractScope": null,
"id": 74,
"name": "Reputation",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 13407,
"src": "521:10:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Reputation_$13407",
"typeString": "contract Reputation"
}
},
"value": null,
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 81,
"name": "GenericCall",
"nodeType": "EventDefinition",
"parameters": {
"id": 80,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 77,
"indexed": true,
"name": "_contract",
"nodeType": "VariableDeclaration",
"scope": 81,
"src": "580:25:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 76,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "580:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 79,
"indexed": false,
"name": "_params",
"nodeType": "VariableDeclaration",
"scope": 81,
"src": "607:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 78,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "607:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "579:42:1"
},
"src": "562:60:1"
},
{
"anonymous": false,
"documentation": null,
"id": 87,
"name": "SendEther",
"nodeType": "EventDefinition",
"parameters": {
"id": 86,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 83,
"indexed": false,
"name": "_amountInWei",
"nodeType": "VariableDeclaration",
"scope": 87,
"src": "643:17:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 82,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "643:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 85,
"indexed": true,
"name": "_to",
"nodeType": "VariableDeclaration",
"scope": 87,
"src": "662:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 84,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "662:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "642:40:1"
},
"src": "627:56:1"
},
{
"anonymous": false,
"documentation": null,
"id": 95,
"name": "ExternalTokenTransfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 94,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 89,
"indexed": true,
"name": "_externalToken",
"nodeType": "VariableDeclaration",
"scope": 95,
"src": "716:30:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 88,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "716:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 91,
"indexed": true,
"name": "_to",
"nodeType": "VariableDeclaration",
"scope": 95,
"src": "748:19:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 90,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "748:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 93,
"indexed": false,
"name": "_value",
"nodeType": "VariableDeclaration",
"scope": 95,
"src": "769:11:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 92,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "769:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "715:66:1"
},
"src": "688:94:1"
},
{
"anonymous": false,
"documentation": null,
"id": 105,
"name": "ExternalTokenTransferFrom",
"nodeType": "EventDefinition",
"parameters": {
"id": 104,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 97,
"indexed": true,
"name": "_externalToken",
"nodeType": "VariableDeclaration",
"scope": 105,
"src": "819:30:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 96,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "819:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 99,
"indexed": false,