Skip to content

Instantly share code, notes, and snippets.

@aramkoukia
Created January 17, 2017 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aramkoukia/3203cbd3ea4f98952dad22bd971c9d4b to your computer and use it in GitHub Desktop.
Save aramkoukia/3203cbd3ea4f98952dad22bd971c9d4b to your computer and use it in GitHub Desktop.
payout sample solidity smart contract
contract Payout {
address Victor;
address Jim;
address Kieren;
mapping (address => uint) ownershipDistribution;
function Setup() {
Victor = 0xaabb;
Jim = 0xccdd;
Kieren = 0xeeff;
ownershipDistribution[Victor] = 35;
ownershipDistribution[Jim] = 35;
ownershipDistribution[Kieren] = 30;
}
function Dividend() {
uint bal= this.balance;
Victor.send(bal * ownershipDistribution[Victor] / 100);
Jim.send(bal * ownershipDistribution[Jim] / 100);
Kieren.send(bal * ownershipDistribution[Kieren] / 100);
}
}
@rupaliku
Copy link

Hi,
I tried compiling and deploying the payout.sol smart contract from microsoft visual studio community 2015 IDE. But, I am getting this error:
$ bloc start
bloc is listening on http://0.0.0.0:8000

api is pointed to http://strato-dev4.blockapps.net with profile ethereum

GET /users/ 200 76.487 ms - 12

GET /users/testuser 200 65.789 ms - 44

contract as body is: undefined

constructor arguments: undefined

data is: a779528d50b4c12cb5f7e9b8192ba43e390ab33c

About to upload contract

compile failed with error message: TypeError: Cannot convert undefined or null to object

caught a single contract

POST /users/testuser/a779528d50b4c12cb5f7e9b8192ba43e390ab33c/contract 200 706.226 ms - 24

extension was matched: html

Can you please help.

@rupaliku
Copy link

error: compile failed with error message: TypeError: Cannot convert undefined or null to object

@ProphetDaniel
Copy link

@rupaliku, same thing is happening to me.

@JitheshMada
Copy link

same here as well.

" compile failed with error message: TypeError: Cannot convert undefined or null to object "
contract as body is: undefined
constructor arguments: undefined
there was an error: {"cause":{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C.....

@bladerzhu
Copy link

same thing is happening to me as i follow the document

@OkkerB
Copy link

OkkerB commented Jan 10, 2018

Same thing here. Anny one found a solution to this problem yet?

@karstenkarlsen
Copy link

Same thing here. Any solution to this problem yet?

@zerocoins
Copy link

same issue here...
About to upload contract

compile failed with error message: TypeError: Cannot convert undefined or null to object

caught a single contract

Any ideas ... Did anyone solve this issue?

@voteopolis
Copy link

same issue here.
any solutions?

@alessalessio
Copy link

same here:

Contract Payout created successfully at address error uploading contract
Contract can be accessed here: http://localhost:8000/contracts/Payout/error uploading contract.html (default password: testing)

@sricard
Copy link

sricard commented May 7, 2018

What's the deal? Why hasn't anyone responded with a fix for this? Unsupported code? We would really love to use this tool, but if no one is going to support it I guess we have to go elsewhere. What a waste of people's time, both who ever created it and those of us frustrated trying to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment