Questions tagged [contract]
424 questions
1
vote
1 answer
Write abstraction function and representation invariant
I know what abstraction function and representation invariant are, but I have difficulty writing them on my own.
Abstraction Function: A function from an object's concrete representation to the abstract value it represents.
Representation Invariant:…

cieco1109
- 73
- 6
1
vote
0 answers
Json.NET C#: Custom Converter assigned in Custom Contract Resolver being ignored on deserialisation
I've been building a serialisation system that works by assigning a special ReferenceJConverter or DefinitionJConverter based on what attributes an object has been decorated with. These custom JsonConverters are assigned by logic in a custom…

Thomas Slade
- 129
- 9
1
vote
0 answers
Error deploying smart contract to my private ethereum network
I keep getting this "Error: The contract code couldn't be stored, please check your gas amount." message when I try to deploy my contract to the blockchain.
I read that is a generic error so I'd like to ask you for your help to find the…

Kurosh D.
- 74
- 7
1
vote
1 answer
Why this ethereum contract transaction used less gas?
Please checkout this below ethereum transaction:
0xe9adbe7e538ccf9f9d4ede8cc4200581dac131976738d3bbf0eb90700cd8a2b6
An ethereum transaction consumes at least 35,000 GAS to transfer ERC20 tokens on contracts for replacing two accounts balances and…

Temüjin
- 15,371
- 8
- 35
- 57
1
vote
2 answers
Ethereum: Do I need a node to call a (read-)function on a smart contract?
I am pretty much a noob on this topic, so please bear with me. Do i need a node to read out a method that has been deployed to an Ethereum network? I'd very much appreciate your help!

BigHead
- 53
- 3
1
vote
1 answer
Racket Contract Violation (Max Recursion Function)
Learning some Scheme/Racket, so give me some leeway.
Currently trying to find the max value when given a list without using the built-in max() function.
Current Code:
#lang racket
(provide max-num)
(define (max-num lst)
(define (helper lst max)
…

user2980932
- 93
- 6
1
vote
1 answer
Are Corda Contracts Legally Binding?
I have a client that wants to put contracts on a Distributed Ledger and have both parties sign them electronically. I’m pretty familiar with PKI and Certificate Authorities, but I don’t see the connection to Corda contracts. Suppose we want a…

Quark Soup
- 4,272
- 3
- 42
- 74
1
vote
1 answer
Spring cloud contract best practice to handle unhappy path
We used to have wiremock for integration tests with both happy and unhappy paths. Now we are trying to move to Spring cloud contract based integration tests. Though, I could not find any document related to contracts for unhappy paths (status code…

Michael Sun
- 31
- 2
1
vote
3 answers
Tree depth: car/cdr contract violation
I'm using racket to return the depth of a given tree. Here's the current code:
(define (depth tree)
(cond
[(empty? tree) 0]
[else
(+ 1 (max (depth (cadr tree))
(depth (caddr tree))))]))
I haven't been able to…

anikaT4960
- 11
- 3
1
vote
1 answer
How is smart contract synchronized over blockchain?
Imagine smart contract getting triggered by transaction and as result it sends another transaction. How is the code shall be executed? If each node will execute code there gonna be lots of same transactions with only possible difference in…

Yuri Stiopin
- 105
- 10
1
vote
1 answer
Unable to get account listed in from drop down on Deploy Contract Screen.
I am new to the blockchain. I have configured the geth and mist on my Windows 10 64bit.
I have configured the private network using command
"geth --datadir=./foldername/"
ipc file got generated and then I launched mist browser.
After launching mist…

Mohammed Gadi
- 381
- 5
- 18
1
vote
1 answer
Pact for MessageQueue's : Sample Provider test in case of MessageQueues
I have written sample Pact test for MessageProvider by referring to sample example given in pact repo. Following is the consumer test which is generating the PACT json file for the message expected from Provider.
In case of API, to verify the PACT,…

Sunil
- 136
- 2
- 12
1
vote
1 answer
Solidity: contract calling another contract and addresses are different, why?
I have a wrapper contract that instantiates and calls another contract, and my test cases say the owners (msg.sender)s don't match. Why?
contract A
pragma solidity ^0.4.4;
contract A {
address public owner;
function A() {
owner =…

The Nomad
- 7,155
- 14
- 65
- 100
1
vote
2 answers
Automated tests on contracts between microservices?
Say we have a CreditCardService microservice that depends on a ThreeDSecureService microservice, communicating using JSON.
Minor changes in the API (or even implementation) of the ThreeDSecureService could silently break the CreditCardService (and…

Timo
- 7,992
- 4
- 49
- 67
1
vote
0 answers
pact-jvm-server Complete returns 400
I've got a pact-jvm-server instance in Docker and when ever I call the /create method it creates a stub server and returns the correct responses. But now when I try to delete the stub server on the selected port with /complete call and port in body…

cotnic
- 158
- 2
- 11