Questions tagged [contract]

424 questions
3
votes
0 answers

atomicMatch for Opensea via etherscan?

Is it possible to complete an atomicMatch on Opensea via Etherscan? Rinkeby as example https://rinkeby.etherscan.io/address/0x5206e78b21ce315ce284fb24cf05e0585a93b1d9#code Some of the argument inputs look like they are taking several arguments as…
JohnG
  • 31
  • 3
3
votes
2 answers

Set price in Solidity contract using ERC-20 token

I have a ERC721 contract and I have one problem, I'm trying to set the price in another currency like UNI or SUSHI but the problem is that I don't know how to change it, I don't know a lot about contracts, here is the code. I was wondering if it is…
Nayra1316
  • 31
  • 4
3
votes
1 answer

Code contract does not work in Visual Studio 2019

I was learning code contract but it doesn't throw me any error or anything. I am using Visual Studio 2019. Here's the code: using System.Diagnostics.Contracts; namespace ConsoleApp1 { class Calculations { public static void…
3
votes
1 answer

Dependent contracts for structs in Racket

Suppose I define a struct for a set with its "center". (struct centered-set (center elems)) I want to guarantee the following conditions. elems is a set. center is an member of elems. I can express the conditions with #:guard. Is there a way to…
sazf
  • 33
  • 3
3
votes
1 answer

Cannot use Illuminate\Contracts\Auth\Authenticatable - it is not a trait

I try to test my application for login and logout, with a jwtToken. I'm lost with Laravel Contract and Trait. I read a lot of questions/answers but the solutions cannot work on my code. I understand that contract not work like trait but it's seems…
Couka56
  • 31
  • 1
  • 2
3
votes
2 answers

Racket: Custom predicate to use within contract

I'm writing small pet project in Racket and using Gregor lib to handle dates. I have function that accepts two dates (from Gregor, not standard library) and I would like to add contract for it. Contract should say that date from first argument has…
Bohdan Ivanov
  • 806
  • 9
  • 28
3
votes
1 answer

odoo TypeError: Mixing Apples and Oranges on inherited model

I have odoo 12 with the module Contracts Management - Recurring" and I'm writing a module that creates a model called "leases' that inherits from account.analytic.account using _inherit. The form view inherits from…
3
votes
1 answer

Testing against the C++20 contracts (assertions)

Herb Sutter delivered a talk at ACUU Conference regarding the future of exceptions in C++ and upcoming contracts to replace or enhance existing assert. He postulates the following rules to deal with error handling: System corruption (e.g., stack…
Resurrection
  • 3,916
  • 2
  • 34
  • 56
3
votes
0 answers

Getting Error when calling method on ethereum smart contract (abi: unmarshalling empty output)

I am using Go to interact with an ethereum smart contract hosted on the rinkby test network and get the following error when executing a method on the contract: "abi: unmarshalling empty output" Do you have any idea what could be causing this? This…
BigHead
  • 53
  • 3
3
votes
1 answer

How can I use define/contract (or something equivalent) in Typed Racket?

I am writing a function that accepts only positive numbers, and I want to ensure that it is used correctly both inside the module and elsewhere. I wanted to write #lang typed/racket (require racket/contract) (: excited-logarithm (-> Number…
shadowtalker
  • 12,529
  • 3
  • 53
  • 96
3
votes
1 answer

How do I specify a contract's namespace in the XML configuration of a WCF endpoint?

I've got this WCF service contract (heavily simplified, but pay attention to the namespace it's in): namespace Foo.Services.BarService { [ServiceContract] interface BarContract {... } } In my app.config (client side), I configure an…
3
votes
1 answer

Spring Cloud Contract testing without Spring Framework (Boot)

I would like to know if it is possible to use Spring Cloud Contracts with other frameworks not only Spring Boot? An example of another framework I'd like to test Spring Cloud Contract is KumuluzEE.
cotnic
  • 158
  • 2
  • 11
3
votes
1 answer

CreateChannel with ClientCredentials property

I'm pretty new to WCF and trying to create a WCF service with custom username and password. I know that I should set the userName and Password to the proxy's ClientCredentials, but out of some reason, I have no such a property... I assume it has…
DA_Prog
  • 263
  • 3
  • 7
  • 14
3
votes
0 answers

Action cannot be processed due to ContractFilter mismatch at the EndpointDispatcher

I am trying to get a simple webservice running that sends emails out upon being triggered but I am getting the following error when trying to set it up: The message with Action 'localhost/IFabricService/StartMailRun' cannot be processed at the…
Jay
  • 3,012
  • 14
  • 48
  • 99
3
votes
1 answer

What is a Service Contract in WCF?

What exactly is a service contract in WCF? I can't seem to be able to find a clear definition of what is it. If you have have a link that defines what it is that would be great.
Jack Thor
  • 1,554
  • 4
  • 24
  • 53