Questions tagged [contract]
424 questions
1
vote
0 answers
Tron blockchain : Filters not working on get events
Trying to apply filter on contract event But it always return all records seems like filter not working.
this.CONTRACT_ADDRESS,
{
eventName: "InvoiceLog",
filters: { '_invoiceId': id.toString()},
}
…

Pardeep Kumar
- 11
- 1
1
vote
2 answers
Spring Cloud Contract Content type not supported
I am using spring cloud contract and I am getting the error
2020-06-23 23:27:41.940 WARN 39531 ---
[main] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException:
Content type…

Sparkmuse
- 61
- 9
1
vote
1 answer
How to autoextend maximo contract at due date?
I'm trying to know whether there is a standard way to auto extend a Maximo contract at due date. In most Maximo contract application, there are fields to set up auto extend but there is not any cron task to handle such purpose. Do I really have to…

Bigmwaj
- 361
- 2
- 7
1
vote
0 answers
Could not find metadata maven-metadata.xml in remote(nexus)
I use spring-contract as contract test in my project with gradle. I want to publish the contract stubs to nexus server. But when I execute the publishing command. The error occur.
build.gradle file
buildscript {
project.ext {
bootVersion…

Xin
- 55
- 1
- 6
1
vote
0 answers
Better way to define a contract for a function with a lot of keyword arguments
Say I have a function that takes a lot of homogeneous keywords arguments:
(define (my-function #:arg1 arg1
#:arg2 arg2
; etc.
#:argN argN) (do-something))
"Homogeneous" in the sense…

Xophmeister
- 8,884
- 4
- 44
- 87
1
vote
0 answers
Contract testing for multiple events in the same destination
I've got this configuration:
spring:
cloud.stream.bindings:
input-product-created:
content-type: application/json
destination: output-product-management
input-product-deleted:
content-type: application/json
…

MuchaZ
- 391
- 4
- 18
1
vote
2 answers
Spring Cloud Contract LocalDateTime assertions fail
for the last day i've been struggling with the LocalDateTime in Spring Contract Tests.
base class:
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)
public abstract class VennotenDossiersConsumerBase {
@Autowired
private…

Bart Duwez
- 71
- 6
1
vote
1 answer
Converting bytecode of Solidity smart contract back to its original state
If I deploy a smart contract on the Ethereum blockchain and I don't want anyone else to see the content of my code, could they see it by converting the bytecode of the contract -easily- using some kind of tool/decompiler/decryption? For example I…

Warrax
- 21
- 2
- 5
1
vote
1 answer
How to start with PACT contract testing in java for a newbie
I have to do a POC on contract testing using pact, but I couldn't found anything helpful for a newbie. Can someone help me with the working code, how to install, execute I will be grateful.

abhishek singh
- 79
- 1
- 3
1
vote
0 answers
Is post-condition of the function valid in all cases or only if the function is successful?
Let's say I have a following function:
int reserve(DmaChannel& channel, const uint8_t request)
{
const auto ret = channel.reserve(request);
if (ret != 0)
return ret;
channel_ = &channel;
return 0;
}
It is clearly visible,…

Freddie Chopin
- 8,440
- 2
- 28
- 58
1
vote
1 answer
How to check empty in solidity
In solidity can we check if(empty) just like we do in php
Or anything equivalent to that. What I want to do is to check if msg.sender trigger the call with empty msg.value or has put some amount to trigger the function
if (empty(msg.value))

Ophelia
- 41
- 5
1
vote
2 answers
Defining racket contracts with a custom predicate
I'm just starting to learn about contracts (via exercism.io) and so I have made a contract that is:
[step1 (-> (and/c number?
less-than-one-hundred?)
string?)]
What I think I'm saying is the function will take a number…

robertpostill
- 3,820
- 3
- 29
- 38
1
vote
2 answers
Solidity: Error when calling a function of another contract. Error: The constructor should be payable when you send value
I am playing around with Solidity and I thought of seeing how a test marketplace would function. However, I seem to have run into an issue which I cant seem to figure out. The code is shabby because I am just trying to figure out how it works on the…

M65D85
- 23
- 9
1
vote
0 answers
how verifies the nonce produced by ethash through contract && add new opcode in EVM
I want to verify the pow of memory of one computer, then I use the ethash algorithm that used by ethereum to do the work. The problem is that the cache and dataset in the algorithm is too large for contracts. How can I verify the work?
In my…

Sanghai
- 47
- 7
1
vote
0 answers
crowdsale from existing token contract solidity
I am getting started with the solidity ethereum smart contracts, and am trying to make a crowdsale contract for an existing token which I am holding in my wallet.
Can someone take a look at my contract and explain me what I am doing wrong…

Thomas
- 11
- 1